PWA
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m24s

This commit is contained in:
eewing
2026-02-19 07:41:49 -06:00
parent 5776a1fdb1
commit c0fae761da
10919 changed files with 874329 additions and 13511 deletions
+12
View File
@@ -11,6 +11,7 @@
import { Label } from '$lib/components/ui/label';
import { Switch } from '$lib/components/ui/switch';
import { siteSlugs } from '$lib/sites';
import { pwaInfo } from 'virtual:pwa-info';
let { data, children }: {
data: { user: { id: string; email?: string; name?: string; avatar?: string; darkmode: boolean } | null };
@@ -42,6 +43,11 @@
});
onMount(() => {
if (pwaInfo) {
import('virtual:pwa-register').then(({ registerSW }) => {
registerSW({ immediate: true });
});
}
onDarkmodeChange = async (checked: boolean) => {
darkmode = checked;
try {
@@ -58,6 +64,12 @@
});
</script>
<svelte:head>
{#if pwaInfo?.webManifest?.linkTag}
{@html pwaInfo.webManifest.linkTag}
{/if}
</svelte:head>
<div class="app-shell">
{#if data.user && !isSiteRoute}
<header