diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index dcb2a64..ff935db 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -10,6 +10,8 @@ import { Margins } from "@vencord/types/utils"; import { Button, Forms, Select, Switch, Text, useState } from "@vencord/types/webpack/common"; import { setBadge } from "renderer/appBadge"; import { useSettings } from "renderer/settings"; +import { isMac } from "renderer/utils"; +import { isTruthy } from "shared/utils/guards"; export default function SettingsUi() { const Settings = useSettings(); @@ -18,9 +20,9 @@ export default function SettingsUi() { const { autostart } = VesktopNative; const [autoStartEnabled, setAutoStartEnabled] = useState(autostart.isEnabled()); - const switches: [keyof typeof Settings, string, string, boolean?, (() => boolean)?][] = [ - ["tray", "Tray Icon", "Add a tray icon for Vesktop", true], - [ + const allSwitches: Array boolean)?]> = [ + !isMac && ["tray", "Tray Icon", "Add a tray icon for Vesktop", true], + !isMac && [ "minimizeToTray", "Minimize to tray", "Hitting X will make Vesktop minimize to the tray instead of closing", @@ -41,6 +43,8 @@ export default function SettingsUi() { ["staticTitle", "Static Title", 'Makes the window title "Vencord" instead of changing to the current page'] ]; + const switches = allSwitches.filter(isTruthy); + return ( diff --git a/src/renderer/utils.ts b/src/renderer/utils.ts index de90b84..f79718f 100644 --- a/src/renderer/utils.ts +++ b/src/renderer/utils.ts @@ -16,3 +16,4 @@ export const isFirstRun = (() => { const { platform } = navigator; export const isWindows = platform.startsWith("Win"); +export const isMac = platform.startsWith("Mac");