diff --git a/src/routes/(components)/layout/PWAButtons.svelte b/src/routes/(components)/layout/PWAButtons.svelte
index ab8ebe3e..26dcfbdd 100644
--- a/src/routes/(components)/layout/PWAButtons.svelte
+++ b/src/routes/(components)/layout/PWAButtons.svelte
@@ -1,20 +1,16 @@
diff --git a/src/routes/(components)/layout/PWAFunctions.svelte.ts b/src/routes/(components)/layout/PWAFunctions.svelte.ts
new file mode 100644
index 00000000..78e3d2a1
--- /dev/null
+++ b/src/routes/(components)/layout/PWAFunctions.svelte.ts
@@ -0,0 +1,33 @@
+import { browser } from '$app/environment';
+import { useRegisterSW } from 'virtual:pwa-register/svelte';
+
+const sw = browser
+ ? useRegisterSW({
+ onRegisteredSW(swUrl, r) {
+ if (r) {
+ setInterval(async () => {
+ if (!navigator || r.installing) return;
+ if ('connection' in navigator && !navigator.onLine) return;
+
+ const resp = await fetch(swUrl, {
+ cache: 'no-store',
+ headers: {
+ cache: 'no-store',
+ 'cache-control': 'no-cache'
+ }
+ });
+ if (resp.status === 200) await r.update();
+ }, 3600000);
+ }
+ console.log(`SW Registered: ${r}`);
+ },
+ onRegisterError(error) {
+ console.log('SW registration error', error);
+ }
+ })
+ : null;
+
+export const needRefresh = sw?.needRefresh;
+export const updateServiceWorker = sw?.updateServiceWorker;
+export const offlineReady = sw?.offlineReady;
+export const updateDataLossDialog = $state({ open: false });
diff --git a/src/routes/(components)/layout/UpdateDataLossDialog.svelte b/src/routes/(components)/layout/UpdateDataLossDialog.svelte
new file mode 100644
index 00000000..fa5bcd97
--- /dev/null
+++ b/src/routes/(components)/layout/UpdateDataLossDialog.svelte
@@ -0,0 +1,27 @@
+
+
+
+ {#snippet description()}
+ Any unsaved data, like a workout in progress, or an unsaved mesocycle will be lost.
+ {/snippet}
+
+
diff --git a/src/routes/(components)/layout/UserDropdown.svelte b/src/routes/(components)/layout/UserDropdown.svelte
index c3b36bfb..eee3a323 100644
--- a/src/routes/(components)/layout/UserDropdown.svelte
+++ b/src/routes/(components)/layout/UserDropdown.svelte
@@ -8,7 +8,6 @@
function logOut() {
signOut();
localStorage.clear();
- localStorage.setItem('changelogShown', 'true');
}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index d6e4f483..e51e02a1 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -1,14 +1,15 @@