mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-15 07:54:18 +02:00
fix mediasession controls
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { t } from 'i18next';
|
||||
import isElectron from 'is-electron';
|
||||
|
||||
import { toast } from '/@/shared/components/toast/toast';
|
||||
|
||||
const ipc = isElectron() ? window.api.ipc : null;
|
||||
|
||||
export const openRestartRequiredToast = () => {
|
||||
return toast.info({
|
||||
autoClose: false,
|
||||
id: 'restart-toast',
|
||||
message: t('common.forceRestartRequired', {
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
onClose: () => {
|
||||
ipc?.send('app-restart');
|
||||
},
|
||||
title: t('common.restartRequired', {
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user