fix mediasession controls

This commit is contained in:
jeffvli
2025-12-04 01:31:57 -08:00
parent 69fa5bc733
commit 4d626377ef
7 changed files with 98 additions and 58 deletions
@@ -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);