From 447f57ac6342b15eee3420c4502352761505c8dc Mon Sep 17 00:00:00 2001 From: librelad Date: Sun, 24 May 2026 23:15:46 +0100 Subject: [PATCH] fix(webui): use absolute URLs for topbar partial + nav under path routing Path-based routes (e.g. /app/) made the relative fetch('html/topbar.html') resolve to /app/html/topbar.html. The SPA catch-all returns index.html with HTTP 200 instead of 404, so response.ok passed and index.html got injected as the topbar, leaving #nav-app-center absent -> 'Nav element not found' in setActiveNav. Make the topbar fetch and the loadConfig fetch absolute, and switch the remaining relative topbar nav hrefs (index/dashboard/tasks .html) to absolute paths so the SPA click interceptor routes them instead of doing a real browser navigation. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- containers/libreportal/frontend/html/topbar.html | 6 +++--- containers/libreportal/frontend/js/components/topbar.js | 2 +- containers/libreportal/frontend/js/utils/data-loader.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/containers/libreportal/frontend/html/topbar.html b/containers/libreportal/frontend/html/topbar.html index 366abf0..396ad1a 100755 --- a/containers/libreportal/frontend/html/topbar.html +++ b/containers/libreportal/frontend/html/topbar.html @@ -14,7 +14,7 @@