mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-18 16:36:29 +02:00
fix mediasession controls
This commit is contained in:
@@ -5,10 +5,10 @@ import {
|
||||
SettingOption,
|
||||
SettingsSection,
|
||||
} from '/@/renderer/features/settings/components/settings-section';
|
||||
import { openRestartRequiredToast } from '/@/renderer/features/settings/restart-toast';
|
||||
import { useSettingsStoreActions, useWindowSettings } from '/@/renderer/store';
|
||||
import { Select } from '/@/shared/components/select/select';
|
||||
import { Switch } from '/@/shared/components/switch/switch';
|
||||
import { toast } from '/@/shared/components/toast/toast';
|
||||
import { Platform } from '/@/shared/types/types';
|
||||
|
||||
const WINDOW_BAR_OPTIONS = [
|
||||
@@ -44,26 +44,7 @@ export const WindowSettings = () => {
|
||||
const requireRestart = isSwitchingToFrame || isSwitchingToNoFrame;
|
||||
|
||||
if (requireRestart) {
|
||||
toast.info({
|
||||
autoClose: false,
|
||||
id: 'restart-toast',
|
||||
message: t('common.forceRestartRequired', {
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
onClose: () => {
|
||||
window.api.ipc!.send('app-restart');
|
||||
},
|
||||
title: t('common.restartRequired', {
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
});
|
||||
} else {
|
||||
toast.update({
|
||||
autoClose: 0,
|
||||
id: 'restart-toast',
|
||||
message: '',
|
||||
onClose: () => {},
|
||||
}); // clean old toasts
|
||||
openRestartRequiredToast();
|
||||
}
|
||||
|
||||
localSettings?.set('window_window_bar_style', e as Platform);
|
||||
|
||||
Reference in New Issue
Block a user