Fix: Notifications-Klick-Handler durch UI.toast-TypeError blockiert
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?.(…)
This commit is contained in:
parent
bb0250a8b5
commit
90f1c4e299
3 changed files with 5 additions and 5 deletions
|
|
@ -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 = (() => {
|
||||
|
||||
|
|
|
|||
|
|
@ -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.');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue