desktop app windows

This commit is contained in:
2026-03-20 13:33:52 +07:00
parent 366168c7ad
commit 12e7fdf422
9 changed files with 200 additions and 74 deletions
+18
View File
@@ -0,0 +1,18 @@
export const getPlatform = () => {
const userAgent = navigator.userAgent.toLowerCase();
const isTauri = !!(window as any).__TAURI_INTERNALS__;
if (isTauri) {
if (userAgent.includes("android")) return "android";
if (userAgent.includes("iphone") || userAgent.includes("ipad"))
return "ios";
return "desktop";
}
return "web";
};
export const isDesktop = getPlatform() === "desktop";
export const isMobile = ["android", "ios"].includes(getPlatform());
export const isAndroid = getPlatform() === "android";
export const isWeb = getPlatform() === "web";