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
+1
View File
@@ -4,6 +4,7 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=5, viewport-fit=cover" />
<meta name="theme-color" content="#0f172a" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
+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