feat(m5): PWA service worker, offline Dexie store, outbox, sync endpoints

This commit is contained in:
2026-04-30 16:47:27 +02:00
parent df04d9d7a9
commit 4a328ad6cc
12 changed files with 4995 additions and 6 deletions
+5 -1
View File
@@ -1,8 +1,9 @@
<script lang="ts">
import { page } from '$app/state';
import { hasToken } from '$lib/api/client';
import { onMount } from 'svelte';
import { onMount, onDestroy } from 'svelte';
import { goto } from '$app/navigation';
import { startSync, stopSync } from '$lib/stores/sync';
let { children } = $props();
@@ -10,8 +11,11 @@
if (!hasToken() && page.url.pathname !== '/settings') {
goto('/settings');
}
startSync();
});
onDestroy(stopSync);
const navItems = [
{ href: '/today', label: 'Today' },
{ href: '/week', label: 'Week' },