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 -2
View File
@@ -3,6 +3,7 @@
import { searchNotes, readNote } from '$lib/api';
import { debounce } from '$lib/utils/debounce';
import type { SearchResult } from '$lib/types';
import { isMobile } from '$lib/platform';
let query = $state('');
let results = $state<SearchResult[]>([]);
@@ -83,8 +84,6 @@
return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
const isMobile = /android|iphone|ipad|ipod/i.test(navigator.userAgent);
async function openResult(result: SearchResult) {
try {
const content = await readNote(result.path);