From a2de6b6d7004947a4cd99c2b89c22c5607b6dcd4 Mon Sep 17 00:00:00 2001 From: kodi Date: Wed, 11 Mar 2026 09:53:36 +0100 Subject: [PATCH] feat (ui): breadcrumbs werken nu --- .../test_ui_smoke_golden.cpython-313.pyc | Bin 3581 -> 3730 bytes .../tests/golden/test_ui_smoke_golden.py | 2 ++ webui/html/app.js | 13 +++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/webui/backend/tests/golden/__pycache__/test_ui_smoke_golden.cpython-313.pyc b/webui/backend/tests/golden/__pycache__/test_ui_smoke_golden.cpython-313.pyc index 6a7803b3356514e08513a12f47aaa0c53fb76ebb..88365365ec8fbd343a94db372ce7f048072ba3d7 100644 GIT binary patch delta 210 zcmew>JxP}DGcPX}0}#y6*_g@8zLD=AGm{F_Wg+w}Isfhv{Zr4i;ucwarG{ oevGVqtj6CJHn;M4F$yU#TF&6OE}?l*Lh}m)kn_Q9@i>b6fkmoF3}`z5hEyn2 diff --git a/webui/backend/tests/golden/test_ui_smoke_golden.py b/webui/backend/tests/golden/test_ui_smoke_golden.py index b91f29d..397bb2f 100644 --- a/webui/backend/tests/golden/test_ui_smoke_golden.py +++ b/webui/backend/tests/golden/test_ui_smoke_golden.py @@ -30,6 +30,8 @@ class UiSmokeGoldenTest(unittest.TestCase): self.assertIn('id="footer-bar"', body) self.assertIn('id="left-pane"', body) self.assertIn('id="right-pane"', body) + self.assertIn('id="left-breadcrumbs"', body) + self.assertIn('id="right-breadcrumbs"', body) self.assertNotIn('id="bookmarks-panel"', body) self.assertNotIn('id="tasks-panel"', body) diff --git a/webui/html/app.js b/webui/html/app.js index 273df3b..33b2eb7 100644 --- a/webui/html/app.js +++ b/webui/html/app.js @@ -130,16 +130,19 @@ function renderBreadcrumbs(pane, path) { let aggregate = ""; for (let i = 0; i < parts.length; i += 1) { aggregate = i === 0 ? parts[i] : `${aggregate}/${parts[i]}`; + const crumbPath = aggregate; const crumb = createButton(parts[i], () => { setActivePane(pane); - navigateTo(pane, aggregate); + console.debug("[breadcrumbs] click", { pane, crumbPath }); + navigateTo(pane, crumbPath); }); crumb.type = "button"; crumb.onclick = (ev) => { ev.preventDefault(); ev.stopPropagation(); setActivePane(pane); - navigateTo(pane, aggregate); + console.debug("[breadcrumbs] click", { pane, crumbPath }); + navigateTo(pane, crumbPath); }; nav.append(crumb); if (i < parts.length - 1) { @@ -236,6 +239,11 @@ async function loadBrowsePane(pane) { path: model.currentPath, show_hidden: String(model.showHidden), }); + console.debug("[browse] request", { + pane, + path: model.currentPath, + show_hidden: model.showHidden, + }); const data = await apiRequest("GET", `/api/browse?${query.toString()}`); model.currentPath = data.path; document.getElementById(`${pane}-current-path`).textContent = data.path; @@ -291,6 +299,7 @@ async function loadBrowsePane(pane) { } function navigateTo(pane, path) { + console.debug("[navigate] pane-path", { pane, path }); paneState(pane).currentPath = path; setSelectedItem(pane, null); loadBrowsePane(pane);