diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 0255aa4..ec1212e 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 = '458'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '459'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/uebungen.js b/backend/static/js/pages/uebungen.js index 3455c9f..dd3bff6 100644 --- a/backend/static/js/pages/uebungen.js +++ b/backend/static/js/pages/uebungen.js @@ -433,10 +433,18 @@ window.Page_uebungen = (() => { // ---------------------------------------------------------- // INIT // ---------------------------------------------------------- - async function init(container, appState) { + async function init(container, appState, params = {}) { _container = container; _appState = appState; + if (params.kategorie) _activeTab = params.kategorie; _render(); + if (params.name) { + // Nach Render + Progress-Load zur Übung scrollen + setTimeout(() => { + const card = _container.querySelector(`[data-exercise-name="${CSS.escape(params.name)}"]`); + if (card) card.scrollIntoView({ behavior: 'smooth', block: 'center' }); + }, 600); + } // Progress vom Server laden API.training.getProgress().then(rows => { @@ -937,7 +945,7 @@ window.Page_uebungen = (() => { const hasBody = u.schritte.length > 0 || u.fehler.length > 0 || u.steigerung; return ` -
+
diff --git a/backend/static/js/pages/welcome.js b/backend/static/js/pages/welcome.js index 875fbec..8b22aa4 100644 --- a/backend/static/js/pages/welcome.js +++ b/backend/static/js/pages/welcome.js @@ -362,7 +362,9 @@ window.Page_welcome = (() => { ${weightVal}
${ex ? ` -
+
Übung des Tages ${UI.escape(ex.name)} @@ -1138,6 +1140,17 @@ window.Page_welcome = (() => { btn.addEventListener('click', () => App.navigate(btn.dataset.nav)); }); + // Exercise-Chip: navigiert direkt zur spezifischen Übung + const exChip = _container.querySelector('#wc-chip-exercise'); + if (exChip) { + exChip.addEventListener('click', () => { + App.navigate('uebungen', true, { + name: exChip.dataset.exerciseName, + kategorie: exChip.dataset.exerciseKat, + }); + }); + } + // Hero-Rotation starten (nur Landing) if (!_appState?.user) _startHeroRotation(); } diff --git a/backend/static/sw.js b/backend/static/sw.js index 3da4473..a973334 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-v481'; +const CACHE_VERSION = 'by-v482'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten