mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
[enhancement]: Start minimized (#522)
* [enhancement]: support starting minimized * show window when dock clicked macos
This commit is contained in:
parent
77fa723cf8
commit
5caf0d439f
4 changed files with 39 additions and 5 deletions
|
|
@ -131,6 +131,31 @@ export const WindowSettings = () => {
|
|||
isHidden: !isElectron(),
|
||||
title: t('setting.exitToTray', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
aria-label="Toggle start in tray"
|
||||
defaultChecked={settings.startMinimized}
|
||||
disabled={!isElectron()}
|
||||
onChange={(e) => {
|
||||
if (!e) return;
|
||||
localSettings?.set('window_start_minimized', e.currentTarget.checked);
|
||||
setSettings({
|
||||
window: {
|
||||
...settings,
|
||||
startMinimized: e.currentTarget.checked,
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.startMinimized', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: !isElectron(),
|
||||
title: t('setting.startMinimized', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
];
|
||||
|
||||
return <SettingsSection options={windowOptions} />;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue