diff --git a/VERSION b/VERSION index 1f168c5..130e16f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1199 \ No newline at end of file +1200 \ No newline at end of file diff --git a/backend/static/index.html b/backend/static/index.html index f4336fa..ee9c1d3 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 a9d2fe9..095a643 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 = '1199'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1200'; // ← 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; @@ -295,16 +295,27 @@ const App = (() => { }); page.module = {}; // verhindert erneutes Laden } - } catch { + } catch (err) { + // Echten Fehler NICHT verschlucken — sonst rätselt man bei jedem Seiten-Crash + console.error(`[page-load] ${pageId} init fehlgeschlagen:`, err); const _offline = !navigator.onLine; container.innerHTML = UI.emptyState({ - icon: _offline ? '📡' : '🚧', + icon: _offline ? '📡' : '⚠️', title: pages[pageId].title, text: _offline ? 'Diese Seite ist offline nicht verfügbar. Bitte öffne sie einmal mit Internetverbindung, damit sie gecacht wird.' - : 'Diese Seite ist noch in Entwicklung.', + : 'Die Seite konnte nicht geladen werden. Das passiert manchmal nach einem Update.', + action: _offline ? '' : + ``, }); - page.module = {}; + document.getElementById('page-retry-btn')?.addEventListener('click', () => { + page._loading = false; + navigate(pageId, false, params); + }); + // WICHTIG: page.module NICHT auf {} setzen. Bei einem echten Fehler (Netz-Blip, + // SW-Update mitten in der Navigation, Race) würde {} die Seite für die ganze + // Session tot stellen — der Guard `if (page.module)` käme nie mehr zum Laden. + // So wird beim nächsten Aufruf neu versucht und ein transienter Fehler heilt sich. } finally { page._loading = false; } diff --git a/backend/static/landing.html b/backend/static/landing.html index 3d19ddc..239a3f6 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 04ea831..5aac805 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 = '1199'; +const VER = '1200'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten