mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-31 00:22:30 +00:00
- macOS: overlay mode with native traffic lights, toolbar as drag region - Windows/Linux: frameless window with custom minimize/maximize/close buttons - Double-click toolbar to toggle maximize
14 lines
385 B
TypeScript
14 lines
385 B
TypeScript
export type Platform = "macos" | "windows" | "linux" | "unknown";
|
|
|
|
export function getPlatform(): Platform {
|
|
const ua = navigator.userAgent.toLowerCase();
|
|
if (ua.includes("mac")) return "macos";
|
|
if (ua.includes("win")) return "windows";
|
|
if (ua.includes("linux")) return "linux";
|
|
return "unknown";
|
|
}
|
|
|
|
export function isMacOS(): boolean {
|
|
return getPlatform() === "macos";
|
|
}
|