Fix: Exercise-Chip Click-Handler nach async Chip-Update binden — SW by-v484, APP_VER 461

This commit is contained in:
rene 2026-04-29 10:04:43 +02:00
parent 59feecb30b
commit 69140a261e
3 changed files with 12 additions and 3 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung. Router, State-Management, Navigation, Initialisierung.
============================================================ */ ============================================================ */
const APP_VER = '460'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VER = '461'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const App = (() => { const App = (() => {

View file

@ -526,10 +526,19 @@ window.Page_welcome = (() => {
const chipsRow = _container.querySelector('#wc-chips-row'); const chipsRow = _container.querySelector('#wc-chips-row');
if (!chipsRow) return; if (!chipsRow) return;
chipsRow.outerHTML = _chipsHTML(dash); chipsRow.outerHTML = _chipsHTML(dash);
// re-bind data-nav auf den neuen Chips
_container.querySelectorAll('#wc-chips-row [data-nav]').forEach(el => { _container.querySelectorAll('#wc-chips-row [data-nav]').forEach(el => {
el.addEventListener('click', () => App.navigate(el.dataset.nav)); el.addEventListener('click', () => App.navigate(el.dataset.nav));
}); });
// Exercise-Chip hat kein data-nav — separat binden
const exChip = _container.querySelector('#wc-chip-exercise');
if (exChip) {
exChip.addEventListener('click', () => {
App.navigate('uebungen', true, {
name: exChip.dataset.exerciseName,
kategorie: exChip.dataset.exerciseKat,
});
});
}
} }
// ---------------------------------------------------------- // ----------------------------------------------------------

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache Offline-Cache + Push Notifications + Tile-Cache
============================================================ */ ============================================================ */
const CACHE_VERSION = 'by-v483'; const CACHE_VERSION = 'by-v484';
const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten