diff --git a/src/utils/platform.ts b/src/utils/platform.ts index 27332f9..0e0cbee 100644 --- a/src/utils/platform.ts +++ b/src/utils/platform.ts @@ -1,9 +1,13 @@ import { family as osFamily, platform } from "@tauri-apps/plugin-os"; export const isWeb = !("__TAURI_OS_PLUGIN_INTERNALS__" in window); -export const isMobile = isWeb ? navigator.userAgent.toLowerCase().includes("mobile") : platform() === "android"; +export const isMobile = isWeb + ? navigator.userAgent.toLowerCase().includes("mobile") + : platform() === "android"; export const isDesktop = !isMobile; export const isMac = !isWeb && platform() === "macos"; +export const isWin = !isWeb && platform() === "windows"; +export const isLinux = !isWeb && platform() === "linux"; export const appScale = isMobile ? 0.5 : 1; export function family() { @@ -17,4 +21,4 @@ export function family() { } else { return osFamily(); } -} \ No newline at end of file +}