android: enable offline sync and hide theme toggle in Tauri app

Detect Tauri via __TAURI__ in pwaStore so the offline recipe sync,
image caching, and auto-sync activate in the Android shell.
This commit is contained in:
2026-03-23 17:38:17 +01:00
parent fa6e7c8d1f
commit 81a1d25e5f
+4 -1
View File
@@ -30,10 +30,13 @@ function createPWAStore() {
let autoSyncInterval: ReturnType<typeof setInterval> | null = null;
// Check if running as installed PWA (standalone mode)
// Check if running as installed PWA or Tauri app
function checkStandaloneMode(): boolean {
if (!browser) return false;
// Check Tauri Android shell
if ('__TAURI__' in window) return true;
// Check display-mode media query (works on most browsers)
const standaloneQuery = window.matchMedia('(display-mode: standalone)');
if (standaloneQuery.matches) return true;