From 67f14db74a1f3a46458ef6738e76b9ec78f4d788 Mon Sep 17 00:00:00 2001 From: jelveh Date: Sat, 25 Apr 2026 11:25:03 -0700 Subject: [PATCH] Use anchor tags for dashboard sidebar items --- src/gui/src/UI/Dashboard/UIDashboard.js | 9 ++++++--- src/gui/src/css/dashboard.css | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/src/UI/Dashboard/UIDashboard.js b/src/gui/src/UI/Dashboard/UIDashboard.js index 5e86f0b90..28ac84a17 100644 --- a/src/gui/src/UI/Dashboard/UIDashboard.js +++ b/src/gui/src/UI/Dashboard/UIDashboard.js @@ -99,10 +99,12 @@ async function UIDashboard (options) { continue; } const isActive = i === 0 ? ' active' : ''; - h += `
`; + const tabHash = tab.id === 'home' ? '' : `#${tab.id}`; + const tabHref = tabHash || window.location.pathname; + h += ``; h += tab.icon; h += tab.label; - h += '
'; + h += ''; } h += ''; @@ -391,7 +393,8 @@ async function UIDashboard (options) { window.addEventListener('popstate', handleRouteChange); // Sidebar item click handler - $el_window.on('click', '.dashboard-sidebar-item', function () { + $el_window.on('click', '.dashboard-sidebar-item', function (e) { + e.preventDefault(); const $this = $(this); const section = $this.attr('data-section'); diff --git a/src/gui/src/css/dashboard.css b/src/gui/src/css/dashboard.css index 1a9e2e278..14e7e615e 100644 --- a/src/gui/src/css/dashboard.css +++ b/src/gui/src/css/dashboard.css @@ -352,6 +352,7 @@ body { cursor: pointer; font-size: 14px; color: var(--dashboard-text); + text-decoration: none; transition: background-color 0.15s; flex-shrink: 0; }