Fix #63: decide layout from compile-time platform, not the webview user-agent

This commit is contained in:
Yuri Karamian
2026-06-23 13:12:36 +02:00
parent ac5ab2a27a
commit eeea16531a
12 changed files with 40 additions and 29 deletions
+1 -5
View File
@@ -4,13 +4,11 @@
import { theme, appConfig, activeNote, activeNotePath, installType, platformIsMobile, checkForUpdate, checkForUpdateMobile, isManagedInstall } from '$lib/stores/app';
import { openFile, openUrl, readNote, getInstallType, isMobilePlatform } from '$lib/api';
import { get } from 'svelte/store';
import { darkThemes } from '$lib/platform';
import { darkThemes, isMobile, isAndroid } from '$lib/platform';
import ResizeHandles from '$lib/components/ResizeHandles.svelte';
let { children } = $props();
const isMobile = /android|iphone|ipad|ipod/i.test(navigator.userAgent);
// Reactively apply theme class to <html> whenever $theme changes
$effect(() => {
applyTheme($theme);
@@ -46,8 +44,6 @@
return resolved.join('/');
}
const isAndroid = /android/i.test(navigator.userAgent);
function openLocalFile(path: string) {
if (isAndroid) {
const bridge = (window as any).Android;