2026-04-24 16:25:36 +02:00
|
|
|
import { isTauri } from '../mock-tauri'
|
|
|
|
|
|
|
|
|
|
function getUserAgent(): string {
|
|
|
|
|
if (typeof navigator === 'undefined') return ''
|
|
|
|
|
return navigator.userAgent
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function isLinux(): boolean {
|
|
|
|
|
const userAgent = getUserAgent()
|
|
|
|
|
return userAgent.includes('Linux') && !userAgent.includes('Android')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function isMac(): boolean {
|
|
|
|
|
const userAgent = getUserAgent()
|
|
|
|
|
return userAgent.includes('Mac OS X') || userAgent.includes('Macintosh')
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-05 01:43:13 +02:00
|
|
|
export function isWindows(): boolean {
|
|
|
|
|
return getUserAgent().includes('Windows')
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-24 16:25:36 +02:00
|
|
|
export function shouldUseLinuxWindowChrome(): boolean {
|
|
|
|
|
return isTauri() && isLinux()
|
|
|
|
|
}
|