mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-09-19 17:37:29 +02:00
Fix desktop showing the mobile layout: decide layout from the actual build platform (cfg!(mobile)) instead of sniffing the webview user-agent, which some WebKitGTK builds report mobile-looking (#63)
This commit is contained in:
@@ -85,6 +85,11 @@ export const updateAvailable = writable<{
|
||||
} | null>(null);
|
||||
export const updateObj = writable<any>(null);
|
||||
export const installType = writable<string>("native");
|
||||
// True only on the Android/iOS build. Defaults to a user-agent guess for the first paint, then
|
||||
// gets the authoritative compile-time value from the backend at startup (see +layout). (#63)
|
||||
export const platformIsMobile = writable<boolean>(
|
||||
typeof navigator !== "undefined" && /android|iphone|ipad|ipod/i.test(navigator.userAgent),
|
||||
);
|
||||
export const androidApkUrl = writable<string | null>(null);
|
||||
|
||||
// Install types that handle their own updates (in-app auto-updater, or a
|
||||
|
||||
Reference in New Issue
Block a user