diff --git a/VERSION b/VERSION index 2b48a28..5642d7e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1105 \ No newline at end of file +1106 \ No newline at end of file diff --git a/backend/main.py b/backend/main.py index b409706..aac642e 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1763,32 +1763,40 @@ async def force_update(): Ban Yaro — Update +p{color:#94a3b8;font-size:14px} +button{margin-top:24px;background:#C4843A;color:#fff;border:none;padding:12px 24px; +border-radius:8px;font-size:16px;cursor:pointer}
⏳ Einen Moment…

Wir besorgen neue Leckerlis 🦴

+ """ return HTMLResponse(content=html, headers={"Cache-Control": "no-store"}) diff --git a/backend/static/index.html b/backend/static/index.html index 0efb61d..113e542 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 fa2432e..08770c9 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 = '1105'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1106'; // ← 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,17 +129,19 @@ 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. + // UND wenn nicht erst kürzlich force-update lief (Cooldown 10 Min) — verhindert Loop + // bei mehreren schnellen Deploys oder iOS-PWA-Cache-Quirks. localStorage überlebt + // App-Restarts (sessionStorage wäre bei PWA-Standalone-close weg). if (window._byUpdatePending) { const modalOpen = document.querySelector('#modal-container .modal-overlay') !== null; - const lastForce = parseInt(sessionStorage.getItem('by_last_force_update') || '0', 10); - const cooldownActive = (Date.now() - lastForce) < 5 * 60 * 1000; + let lastForce = 0; + try { lastForce = parseInt(localStorage.getItem('by_last_force_update') || '0', 10); } catch {} + const cooldownActive = (Date.now() - lastForce) < 10 * 60 * 1000; if (!modalOpen && !cooldownActive) { window._byUpdatePending = false; sessionStorage.setItem('by_updated_to', window._byNewVersion || ''); sessionStorage.setItem('by_update_target', pageId); - sessionStorage.setItem('by_last_force_update', String(Date.now())); + try { localStorage.setItem('by_last_force_update', String(Date.now())); } catch {} location.href = '/force-update'; return; } diff --git a/backend/static/landing.html b/backend/static/landing.html index 8616190..f5e3ad8 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 0bbb83e..d0ef7bf 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 = '1105'; +const VER = '1106'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten