fix(macos): remove tray

This commit is contained in:
Andrew Attali committed 2026-07-19 01:06:27 +02:00
1 parent 907a0f2470
commit 4199bfb5fd
2 files changed
+32 -30

No files matched your search

+1 -1
View File
@@ -149,7 +149,7 @@ fn apply_desktop_settings(
.show_system_tray_icon
.store(settings.show_system_tray_icon, Ordering::Relaxed);
if settings.show_system_tray_icon {
if settings.show_system_tray_icon && cfg!(not(target_os = "macos")) {
if app.tray_by_id(MAIN_TRAY_ID).is_none() {
match create_system_tray(app) {
Ok(()) => state.tray_available.store(
+31 -29
View File
@@ -61,35 +61,37 @@ export function Desktop({ requestBack, requestClose }: DesktopProps) {
}
/>
</SequenceCard>
<SequenceCard
className={SequenceCardStyle}
variant="SurfaceVariant"
direction="Column"
gap="400"
>
<SettingTile
title="Show system tray icon"
focusId="show-system-tray-icon"
description={
trayFallback ? (
<Text as="span" style={{ color: color.Warning.Main }} size="T200">
System tray is unavailable on this system. Sable can still keep running in
the background without it.
</Text>
) : (
'Show a system tray icon while Sable is running. Disable this if you want Sable to stay available without a tray icon.'
)
}
after={
<Switch
aria-label="show-system-tray-icon"
value={!trayFallback ? showSystemTrayIcon : false}
disabled={trayFallback}
onChange={setShowSystemTrayIcon}
/>
}
/>
</SequenceCard>
{type !== 'macos' && (
<SequenceCard
className={SequenceCardStyle}
variant="SurfaceVariant"
direction="Column"
gap="400"
>
<SettingTile
title="Show system tray icon"
focusId="show-system-tray-icon"
description={
trayFallback ? (
<Text as="span" style={{ color: color.Warning.Main }} size="T200">
System tray is unavailable on this system. Sable can still keep running
in the background without it.
</Text>
) : (
'Show a system tray icon while Sable is running. Disable this if you want Sable to stay available without a tray icon.'
)
}
after={
<Switch
aria-label="show-system-tray-icon"
value={!trayFallback ? showSystemTrayIcon : false}
disabled={trayFallback}
onChange={setShowSystemTrayIcon}
/>
}
/>
</SequenceCard>
)}
</Box>
</Box>
</PageContent>