File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,10 +99,12 @@ async function UIDashboard (options) {
9999 continue ;
100100 }
101101 const isActive = i === 0 ? ' active' : '' ;
102- h += `<div class="dashboard-sidebar-item${ isActive } " data-section="${ tab . id } " data-tooltip="${ html_encode ( tab . label ) } ">` ;
102+ const tabHash = tab . id === 'home' ? '' : `#${ tab . id } ` ;
103+ const tabHref = tabHash || window . location . pathname ;
104+ h += `<a class="dashboard-sidebar-item allow-native-ctxmenu${ isActive } " href="${ tabHref } " data-section="${ tab . id } " data-tooltip="${ html_encode ( tab . label ) } ">` ;
103105 h += tab . icon ;
104106 h += tab . label ;
105- h += '</div >' ;
107+ h += '</a >' ;
106108 }
107109 h += '</div>' ;
108110
@@ -391,7 +393,8 @@ async function UIDashboard (options) {
391393 window . addEventListener ( 'popstate' , handleRouteChange ) ;
392394
393395 // Sidebar item click handler
394- $el_window . on ( 'click' , '.dashboard-sidebar-item' , function ( ) {
396+ $el_window . on ( 'click' , '.dashboard-sidebar-item' , function ( e ) {
397+ e . preventDefault ( ) ;
395398 const $this = $ ( this ) ;
396399 const section = $this . attr ( 'data-section' ) ;
397400
Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ body {
352352 cursor : pointer;
353353 font-size : 14px ;
354354 color : var (--dashboard-text );
355+ text-decoration : none;
355356 transition : background-color 0.15s ;
356357 flex-shrink : 0 ;
357358}
You can’t perform that action at this time.
0 commit comments