allow custom message on restart toast

This commit is contained in:
jeffvli
2025-12-15 11:25:51 -08:00
parent 2372f1890c
commit 593ad7ad12
@@ -5,13 +5,15 @@ import { toast } from '/@/shared/components/toast/toast';
const ipc = isElectron() ? window.api.ipc : null;
export const openRestartRequiredToast = () => {
return toast.info({
export const openRestartRequiredToast = (message?: string) => {
return toast.warn({
autoClose: false,
id: 'restart-toast',
message: t('common.forceRestartRequired', {
postProcess: 'sentenceCase',
}),
message:
message ||
t('common.forceRestartRequired', {
postProcess: 'sentenceCase',
}),
onClose: () => {
ipc?.send('app-restart');
},