Update useIsDesktopApp.ts

This commit is contained in:
Pas 2026-02-02 11:22:24 -07:00
parent be36a43100
commit 949b1081f7

View file

@ -1,3 +1,10 @@
export function useIsDesktopApp(): boolean { // Desktop app is detected via a global set by the Electron preload script.
return navigator.userAgent.includes("P-Stream/"); declare global {
interface Window {
__PSTREAM_DESKTOP__?: boolean;
}
}
export function useIsDesktopApp(): boolean {
return Boolean(window.__PSTREAM_DESKTOP__);
} }