diff --git a/backend/main.py b/backend/main.py index 9281580..b8c033f 100644 --- a/backend/main.py +++ b/backend/main.py @@ -410,7 +410,7 @@ async def serve_media(path: str, request: _Request): raise _HE(404, "Nicht gefunden.") return _media_response(filepath) -APP_VER = "1091" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "1092" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/index.html b/backend/static/index.html index 9494c1a..5644915 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -101,9 +101,9 @@ - - - + + +
@@ -625,11 +625,11 @@ - - - - - + + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 098edb5..d99f484 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 = '1091'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1092'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator) window.APP_VERSION = APP_VERSION; diff --git a/backend/static/js/offline-indicator.js b/backend/static/js/offline-indicator.js index b5cb25f..1168673 100644 --- a/backend/static/js/offline-indicator.js +++ b/backend/static/js/offline-indicator.js @@ -63,9 +63,12 @@ window.OfflineIndicator = (() => { const c = await caches.open(CACHE_API).catch(() => null); if (!c) return false; const urls = (await c.keys()).map(r => r.url); - return urls.some(u => u.includes('/api/expenses')) - && urls.some(u => u.includes('/api/routes')) - && urls.some(u => u.includes('/api/notes')); + const found = [ + urls.some(u => u.includes('/api/expenses')), + urls.some(u => u.includes('/api/routes')), + urls.some(u => u.includes('/api/notes')), + ].filter(Boolean).length; + return found >= 2; // 2 von 3 — toleriert wenn z.B. notes 401 lieferte } }, { step: 5, title: 'Karten-Kacheln', @@ -272,7 +275,7 @@ window.OfflineIndicator = (() => { if (e?.data?.type === 'CACHE_TILES_PROGRESS') refresh(); }); } - setInterval(refresh, 60_000); + setInterval(() => { _prefetchData(); refresh(); }, 60_000); } return { init, refresh, openStatus }; diff --git a/backend/static/sw.js b/backend/static/sw.js index 1c81ced..74c9aa7 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -4,7 +4,7 @@ ============================================================ */ // ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab -const VER = '1091'; +const VER = '1092'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten