File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1193,9 +1193,15 @@ function renderSidebarNav() {
11931193 const nav = $ ( '#sidebar-nav' ) ;
11941194 if ( ! nav ) return ;
11951195
1196+ let indicator = document . getElementById ( 'nav-indicator' ) ;
1197+ if ( ! indicator ) {
1198+ indicator = document . createElement ( 'div' ) ;
1199+ indicator . className = 'nav-indicator' ;
1200+ indicator . id = 'nav-indicator' ;
1201+ }
1202+
11961203 if ( state . sidebarMode === 'account' ) {
11971204 nav . innerHTML = html `
1198- < div class ="nav-indicator " id ="nav-indicator "> </ div >
11991205 < div class ="nav-section-label "> Account</ div >
12001206 < a class ="nav-item ${ state . accountTab === 'info' ? 'active' : '' } " data-account-page ="info " href ="/account/info ">
12011207 < i data-lucide ="user "> </ i >
@@ -1219,9 +1225,9 @@ function renderSidebarNav() {
12191225 Back to Dashboard
12201226 </ a >
12211227 ` ;
1228+ nav . prepend ( indicator ) ;
12221229 } else {
12231230 nav . innerHTML = html `
1224- < div class ="nav-indicator " id ="nav-indicator "> </ div >
12251231 < div class ="nav-section-label "> Main</ div >
12261232 < a class ="nav-item ${ state . currentPage === 'overview' ? 'active' : '' } " data-page ="overview " href ="/ ">
12271233 < i data-lucide ="grid-3x3 "> </ i >
@@ -1276,6 +1282,7 @@ function renderSidebarNav() {
12761282 </ a >
12771283 ` : '' }
12781284 ` ;
1285+ nav . prepend ( indicator ) ;
12791286 }
12801287
12811288 document . querySelectorAll ( '.nav-item[data-page]' ) . forEach ( item => {
You can’t perform that action at this time.
0 commit comments