mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-19 09:54:18 +02:00
allow custom message on restart toast
This commit is contained in:
@@ -5,13 +5,15 @@ import { toast } from '/@/shared/components/toast/toast';
|
|||||||
|
|
||||||
const ipc = isElectron() ? window.api.ipc : null;
|
const ipc = isElectron() ? window.api.ipc : null;
|
||||||
|
|
||||||
export const openRestartRequiredToast = () => {
|
export const openRestartRequiredToast = (message?: string) => {
|
||||||
return toast.info({
|
return toast.warn({
|
||||||
autoClose: false,
|
autoClose: false,
|
||||||
id: 'restart-toast',
|
id: 'restart-toast',
|
||||||
message: t('common.forceRestartRequired', {
|
message:
|
||||||
postProcess: 'sentenceCase',
|
message ||
|
||||||
}),
|
t('common.forceRestartRequired', {
|
||||||
|
postProcess: 'sentenceCase',
|
||||||
|
}),
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
ipc?.send('app-restart');
|
ipc?.send('app-restart');
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user