From f54e7238b4d65f99c2509526a2a370570393b648 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 30 Nov 2026 17:43:13 +0000 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Gate=20the=20app=20behind?= =?UTF-8?q?=20PocketBase=20authentication?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only signed-in users reach the working pages. Everyone else lands on the login page and returns to the page they asked for after signing in. The manifest link moves into the page template and the service worker is registered only in production builds. --- web/src/app.html | 2 + web/src/routes/+layout.svelte | 168 +++++++++++++++++++--------------- web/src/routes/+page.svelte | 6 +- 3 files changed, 99 insertions(+), 77 deletions(-) diff --git a/web/src/app.html b/web/src/app.html index 6a2bb58..6831f55 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -4,6 +4,8 @@ + + %sveltekit.head% diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index 3940bf3..fd383f5 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -1,29 +1,45 @@ - - {#if pwaInfo} - {@html pwaInfo.webManifest.linkTag} - {/if} - +{#if inApp} + - - -
- {@render children()} -
+{:else} +

Loading…

+{/if} diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index 137d56d..08f26d9 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -1,5 +1 @@ - +