mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
feat(desktop): add start minimized option for launch at login (#3094)
This commit is contained in:
1 parent
c2e7fde5bc
commit
d691047884
46 files changed
+1198
-526
No files matched your search
@@ -160,6 +160,22 @@ const DesktopSettingsTab: React.FC = observer(() => {
|
||||
data-flx="user.desktop-settings-tab.switch.autostart-change"
|
||||
/>
|
||||
)}
|
||||
{isDesktop() && desktopWindowBehavior?.startMinimized !== undefined && (
|
||||
<Switch
|
||||
label={<Trans>Start minimized</Trans>}
|
||||
description={
|
||||
isMac ? (
|
||||
<Trans>When launched at login, start in the menu bar instead of opening the window</Trans>
|
||||
) : (
|
||||
<Trans>When launched at login, start in the system tray instead of opening the window</Trans>
|
||||
)
|
||||
}
|
||||
value={desktopWindowBehavior.startMinimized}
|
||||
disabled={desktopWindowBehaviorBusy || !autostartEnabled || !desktopWindowBehavior.showTrayIcon}
|
||||
onChange={(value) => handleDesktopWindowBehaviorChange({startMinimized: value})}
|
||||
data-flx="user.desktop-settings-tab.switch.start-minimized-change"
|
||||
/>
|
||||
)}
|
||||
{isDesktop() && desktopWindowBehavior && (
|
||||
<>
|
||||
<Switch
|
||||
|
||||
+26
@@ -195,6 +195,14 @@ const HIDE_WINDOW_DESCRIPTOR = msg({
|
||||
message: 'Hide window',
|
||||
comment: 'Settings search synonym. Used to match this term when the user types it in the settings search bar.',
|
||||
});
|
||||
const START_MINIMIZED_DESCRIPTOR = msg({
|
||||
message: 'Start minimized',
|
||||
comment: 'Settings search entry label. Names the settings search entry in the settings UI.',
|
||||
});
|
||||
const START_IN_THE_TRAY_WHEN_LAUNCHED_AT_LOGIN_DESCRIPTOR = msg({
|
||||
message: 'Start in the tray instead of opening the window when launched at login',
|
||||
comment: 'Settings search entry description. One-line summary of what the settings search entry controls.',
|
||||
});
|
||||
const HIDE_THE_WINDOW_WHEN_MINIMIZED_AND_REOPEN_FROM_DESCRIPTOR = msg({
|
||||
message: 'Hide the window when minimized and reopen from the tray',
|
||||
comment: 'Settings search entry description. One-line summary of what the settings search entry controls.',
|
||||
@@ -247,6 +255,24 @@ export const desktopSettingsIndex: Array<SearchableSettingDescriptor> = [
|
||||
tags: ['desktop'],
|
||||
isVisible: isDesktop,
|
||||
},
|
||||
{
|
||||
id: 'advanced-start-minimized',
|
||||
tabType: 'desktop_settings',
|
||||
label: START_MINIMIZED_DESCRIPTOR,
|
||||
keywords: [
|
||||
START_MINIMIZED_DESCRIPTOR,
|
||||
MINIMIZE_DESCRIPTOR,
|
||||
STARTUP_DESCRIPTOR,
|
||||
LAUNCH_AT_LOGIN_2_DESCRIPTOR,
|
||||
TRAY_DESCRIPTOR,
|
||||
HIDE_WINDOW_DESCRIPTOR,
|
||||
BACKGROUND_DESCRIPTOR,
|
||||
],
|
||||
description: START_IN_THE_TRAY_WHEN_LAUNCHED_AT_LOGIN_DESCRIPTOR,
|
||||
audience: 'primary',
|
||||
tags: ['desktop'],
|
||||
isVisible: isDesktop,
|
||||
},
|
||||
{
|
||||
id: 'advanced-remember-window-state',
|
||||
tabType: 'desktop_settings',
|
||||
|
||||
Reference in new issue
Block a user