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 ` -