Compare commits
2 Commits
d4e5cdca83
...
c1ab09f406
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1ab09f406 | ||
|
|
dfd4ffa268 |
@ -4,6 +4,5 @@
|
|||||||
"module": "/components/backup/index.js",
|
"module": "/components/backup/index.js",
|
||||||
"handler": "handleBackup",
|
"handler": "handleBackup",
|
||||||
"navId": "nav-backup",
|
"navId": "nav-backup",
|
||||||
"nav": { "label": "Backups", "order": 50 },
|
|
||||||
"order": 50
|
"order": 50
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,10 +74,6 @@
|
|||||||
],
|
],
|
||||||
"module": "/components/updater/index.js",
|
"module": "/components/updater/index.js",
|
||||||
"navId": "nav-updater",
|
"navId": "nav-updater",
|
||||||
"nav": {
|
|
||||||
"label": "Updates",
|
|
||||||
"order": 30
|
|
||||||
},
|
|
||||||
"order": 30
|
"order": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -89,10 +85,6 @@
|
|||||||
"module": "/components/backup/index.js",
|
"module": "/components/backup/index.js",
|
||||||
"handler": "handleBackup",
|
"handler": "handleBackup",
|
||||||
"navId": "nav-backup",
|
"navId": "nav-backup",
|
||||||
"nav": {
|
|
||||||
"label": "Backups",
|
|
||||||
"order": 50
|
|
||||||
},
|
|
||||||
"order": 50
|
"order": 50
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
"routes": ["/updater", "/updater*"],
|
"routes": ["/updater", "/updater*"],
|
||||||
"module": "/components/updater/index.js",
|
"module": "/components/updater/index.js",
|
||||||
"navId": "nav-updater",
|
"navId": "nav-updater",
|
||||||
"nav": { "label": "Updates", "order": 30 },
|
|
||||||
"order": 30,
|
"order": 30,
|
||||||
"note": "App Updater — per-app version tracking, CVE/security scanning, and disaster-recovery (snapshot-before-update + rollback). New feature (no legacy handler); routed via its module. Actions go through libreportal updater tasks."
|
"note": "App Updater — per-app version tracking, CVE/security scanning, and disaster-recovery (snapshot-before-update + rollback). New feature (no legacy handler); routed via its module. Actions go through libreportal updater tasks."
|
||||||
}
|
}
|
||||||
|
|||||||
@ -575,16 +575,14 @@ class LibrePortalSPAClean {
|
|||||||
|
|
||||||
let activeId = 'nav-dashboard'; // default
|
let activeId = 'nav-dashboard'; // default
|
||||||
|
|
||||||
if (path.startsWith('/app') || path.startsWith('/apps')) {
|
// Overview + the backup center live under the App Center umbrella now;
|
||||||
|
// /updater is redirected to /overview, so it never resolves here.
|
||||||
|
if (path.startsWith('/app') || path.startsWith('/apps') || path.startsWith('/overview') || path.startsWith('/backup')) {
|
||||||
activeId = 'nav-app-center';
|
activeId = 'nav-app-center';
|
||||||
} else if (path.startsWith('/admin') || path.startsWith('/config') || path.startsWith('/ssh')) {
|
} else if (path.startsWith('/admin') || path.startsWith('/config') || path.startsWith('/ssh')) {
|
||||||
activeId = 'nav-config';
|
activeId = 'nav-config';
|
||||||
} else if (path.startsWith('/tasks')) {
|
} else if (path.startsWith('/tasks')) {
|
||||||
activeId = 'nav-tasks';
|
activeId = 'nav-tasks';
|
||||||
} else if (path.startsWith('/backup')) {
|
|
||||||
activeId = 'nav-backup';
|
|
||||||
} else if (path.startsWith('/updater')) {
|
|
||||||
activeId = 'nav-updater';
|
|
||||||
} else if (path === '/' || path === '/dashboard') {
|
} else if (path === '/' || path === '/dashboard') {
|
||||||
activeId = 'nav-dashboard';
|
activeId = 'nav-dashboard';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,23 +57,6 @@
|
|||||||
</svg>
|
</svg>
|
||||||
Tasks
|
Tasks
|
||||||
</a>
|
</a>
|
||||||
<a href="/backup" class="nav-item" id="nav-backup">
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
||||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
|
|
||||||
<polyline points="17 8 12 3 7 8"></polyline>
|
|
||||||
<line x1="12" y1="3" x2="12" y2="15"></line>
|
|
||||||
</svg>
|
|
||||||
Backups
|
|
||||||
</a>
|
|
||||||
<a href="/updater" class="nav-item" id="nav-updater">
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
||||||
<path d="M21 2v6h-6"></path>
|
|
||||||
<path d="M3 12a9 9 0 0 1 15-6.7L21 8"></path>
|
|
||||||
<path d="M3 22v-6h6"></path>
|
|
||||||
<path d="M21 12a9 9 0 0 1-15 6.7L3 16"></path>
|
|
||||||
</svg>
|
|
||||||
Updates
|
|
||||||
</a>
|
|
||||||
</nav>
|
</nav>
|
||||||
<div class="mobile-drawer-page-section" id="mobile-drawer-page-section"></div>
|
<div class="mobile-drawer-page-section" id="mobile-drawer-page-section"></div>
|
||||||
<div class="topbar-controls">
|
<div class="topbar-controls">
|
||||||
|
|||||||
@ -429,17 +429,14 @@ class TopbarComponent {
|
|||||||
|
|
||||||
let activeNavId;
|
let activeNavId;
|
||||||
|
|
||||||
// PRIMARY: Use path-based detection only (most reliable)
|
// PRIMARY: Use path-based detection only (most reliable). Overview + the
|
||||||
if (path.startsWith('/app') || path.startsWith('/apps')) {
|
// backup center live under App Center now; /updater redirects to /overview.
|
||||||
|
if (path.startsWith('/app') || path.startsWith('/apps') || path.startsWith('/overview') || path.startsWith('/backup')) {
|
||||||
activeNavId = 'nav-app-center';
|
activeNavId = 'nav-app-center';
|
||||||
} else if (path.startsWith('/admin') || path.startsWith('/config') || path.startsWith('/ssh')) {
|
} else if (path.startsWith('/admin') || path.startsWith('/config') || path.startsWith('/ssh')) {
|
||||||
activeNavId = 'nav-config'; // Admin area (config + SSH live here)
|
activeNavId = 'nav-config'; // Admin area (config + SSH live here)
|
||||||
} else if (path.startsWith('/tasks')) {
|
} else if (path.startsWith('/tasks')) {
|
||||||
activeNavId = 'nav-tasks';
|
activeNavId = 'nav-tasks';
|
||||||
} else if (path.startsWith('/backup')) {
|
|
||||||
activeNavId = 'nav-backup';
|
|
||||||
} else if (path.startsWith('/updater')) {
|
|
||||||
activeNavId = 'nav-updater';
|
|
||||||
} else if (path === '/' || path === '/dashboard') {
|
} else if (path === '/' || path === '/dashboard') {
|
||||||
activeNavId = 'nav-dashboard';
|
activeNavId = 'nav-dashboard';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user