From f8861f39399fffe65a09361ac6515cc1707f6189 Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 30 Apr 2026 16:54:03 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20SW=20skipWaiting()=20sofort=20beim=20Ins?= =?UTF-8?q?tall=20=E2=80=94=20kein=20Warten=20auf=20Cache,=20Update=20grei?= =?UTF-8?q?ft=20sofort,=20SW=20by-v562?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/static/js/app.js | 2 +- backend/static/sw.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 3a6efda..2476a00 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '538'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '539'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.1.3'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; diff --git a/backend/static/sw.js b/backend/static/sw.js index 7a41a97..b443693 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v561'; +const CACHE_VERSION = 'by-v562'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache @@ -134,13 +134,13 @@ function _isCacheableGet(pathname) { // INSTALL — App Shell cachen // ---------------------------------------------------------- self.addEventListener('install', event => { + self.skipWaiting(); // Sofort übernehmen — kein Warten auf Cache-Aufbau event.waitUntil( caches.open(CACHE_STATIC) .then(cache => cache.addAll(STATIC_ASSETS)) .then(() => caches.open(CACHE_API).then(c => fetch('/api/training/exercises').then(r => { if (r.ok) c.put('/api/training/exercises', r); }).catch(() => {}) )) - .then(() => self.skipWaiting()) ); });