mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 15:55:55 +02:00
Fix #63: decide layout from compile-time platform, not the webview user-agent
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user