diff --git a/VERSION b/VERSION index 5afb033..2b48a28 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1104 \ No newline at end of file +1105 \ No newline at end of file diff --git a/backend/main.py b/backend/main.py index b6beb40..b409706 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1770,12 +1770,25 @@ p{color:#94a3b8;font-size:14px} """ return HTMLResponse(content=html, headers={"Cache-Control": "no-store"}) diff --git a/backend/static/index.html b/backend/static/index.html index 846078e..0efb61d 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -86,14 +86,14 @@ Ban Yaro - + - - - - - + + + + + @@ -617,11 +617,11 @@ - - - - - + + + + + @@ -631,7 +631,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 514e893..fa2432e 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 = '1104'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1105'; // ← 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; @@ -129,16 +129,21 @@ const App = (() => { function navigate(pageId, pushHistory = true, params = {}) { if (!pages[pageId]) return; // Neue Version erkannt → nur aktualisieren wenn kein Bearbeitungsfenster offen ist + // UND wenn nicht erst kürzlich force-update lief (Cooldown 5 Min) — verhindert Loop + // bei mehreren schnellen Deploys oder iOS-PWA-Cache-Quirks. if (window._byUpdatePending) { const modalOpen = document.querySelector('#modal-container .modal-overlay') !== null; - if (!modalOpen) { + const lastForce = parseInt(sessionStorage.getItem('by_last_force_update') || '0', 10); + const cooldownActive = (Date.now() - lastForce) < 5 * 60 * 1000; + if (!modalOpen && !cooldownActive) { window._byUpdatePending = false; sessionStorage.setItem('by_updated_to', window._byNewVersion || ''); - sessionStorage.setItem('by_update_target', pageId); // Zielseite nach Update + sessionStorage.setItem('by_update_target', pageId); + sessionStorage.setItem('by_last_force_update', String(Date.now())); location.href = '/force-update'; return; } - // Modal offen → beim nächsten Seitenwechsel versuchen + // Modal offen oder Cooldown → bei nächstem Seitenwechsel versuchen } if (window.Worlds?._visible) window.Worlds.hide(); diff --git a/backend/static/landing.html b/backend/static/landing.html index dccab59..8616190 100644 --- a/backend/static/landing.html +++ b/backend/static/landing.html @@ -4,7 +4,7 @@ - + Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz diff --git a/backend/static/sw.js b/backend/static/sw.js index 4f7215b..0bbb83e 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 = '1104'; +const VER = '1105'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten