mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-24 02:51:17 -08:00
fix(macos): remove tray
This commit is contained in:
2 files changed
+32
-30
No files matched your search
@@ -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(
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user