From 90f1c4e299056361e35231def8714bfcab3f5663 Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 19 Apr 2026 10:16:46 +0200 Subject: [PATCH] Fix: Notifications-Klick-Handler durch UI.toast-TypeError blockiert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UI.toast ist ein Objekt {success,error,info}, kein Funktion. UI.toast?.('...','info') wirft TypeError → async handler crasht still → setTimeout(_execNav) wird nie ausgeführt → keine Navigation Fix: UI.toast?.info?.(…) / UI.toast?.error?.(…) --- backend/static/js/app.js | 2 +- backend/static/js/pages/notifications.js | 6 +++--- backend/static/sw.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/static/js/app.js b/backend/static/js/app.js index d81df0e..4f67493 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 = '210'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '211'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/notifications.js b/backend/static/js/pages/notifications.js index c956a85..6170127 100644 --- a/backend/static/js/pages/notifications.js +++ b/backend/static/js/pages/notifications.js @@ -183,7 +183,7 @@ window.Page_notifications = (() => { items = items.map(n => ({ ...n, read_at: new Date().toISOString() })); _render(items); } catch (e) { - UI.toast?.('Fehler beim Markieren.', 'error'); + UI.toast?.error?.('Fehler beim Markieren.'); } }); } @@ -223,7 +223,7 @@ window.Page_notifications = (() => { API.notifications.read(id).catch(() => {}); if (nav.page) { - if (nav.label) UI.toast?.(`Öffne ${nav.label}…`, 'info'); + if (nav.label) UI.toast?.info?.(`Öffne ${nav.label}…`); setTimeout(() => _execNav(nav), 150); } else { setTimeout(() => { el.style.opacity = ''; }, 800); @@ -261,7 +261,7 @@ window.Page_notifications = (() => { item.style.opacity = ''; item.style.transform = ''; } - UI.toast?.('Löschen fehlgeschlagen.', 'error'); + UI.toast?.error?.('Löschen fehlgeschlagen.'); } }); }); diff --git a/backend/static/sw.js b/backend/static/sw.js index 2900d55..8fbb544 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-v233'; +const CACHE_VERSION = 'by-v234'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten