feat(app): add header tooltips + shortcuts (#16)

This commit is contained in:
Mohamed Boudra
2026-02-05 22:40:29 +07:00
committed by GitHub
parent 6784a3feec
commit a2eab7b00b
9 changed files with 747 additions and 14 deletions
@@ -0,0 +1,18 @@
import { Platform } from "react-native";
import { getIsTauriMac } from "@/constants/layout";
import type { ShortcutOs } from "@/utils/format-shortcut";
export function getShortcutOs(): ShortcutOs {
if (Platform.OS !== "web") {
return Platform.OS === "ios" ? "mac" : "non-mac";
}
if (getIsTauriMac()) return "mac";
if (typeof navigator === "undefined") return "non-mac";
const ua = navigator.userAgent ?? "";
const platform = (navigator as any).platform ?? "";
const isApple =
/Macintosh|Mac OS|iPhone|iPad|iPod/i.test(ua) ||
/Mac|iPhone|iPad|iPod/i.test(platform);
return isApple ? "mac" : "non-mac";
}