Compare commits

..

No commits in common. "05e65bf4b66dfc330e76bb82ded6cda739077c50" and "1a0d5e9a8af77abe2f63c649a8e0da9b73c4702d" have entirely different histories.

2 changed files with 3 additions and 4 deletions

View File

@ -45,7 +45,7 @@
</svg>
App Center
</a>
<a href="/admin/dashboard" class="nav-item" id="nav-config">
<a href="/admin" class="nav-item" id="nav-config">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>
</svg>

View File

@ -550,7 +550,7 @@ class LibrePortalSPAClean {
// Admin area path helpers (shared by the SPA, sidebar, overview, ssh page).
// Map a category to its path-based URL, and parse a path back to a category.
window.adminPath = function (category) {
if (!category || category === 'overview') return '/admin/dashboard'; // the admin board
if (!category || category === 'overview') return '/admin';
if (category === 'system') return '/admin/system'; // stats, not config
if (category === 'ssh-access') return '/admin/tools/ssh-access';
if (category === 'peers') return '/admin/tools/peers';
@ -558,8 +558,7 @@ window.adminPath = function (category) {
};
window.adminCategoryFromPath = function (pathname) {
const segs = String(pathname || '').replace(/^\/admin\/?/, '').split('/').filter(Boolean);
// Bare /admin and /admin/dashboard both resolve to the overview board.
if (!segs.length || segs[0] === 'overview' || segs[0] === 'dashboard') return 'overview';
if (!segs.length || segs[0] === 'overview') return 'overview';
if (segs[0] === 'config') return segs[1] || 'general';
if (segs[0] === 'tools') return segs[1] || 'overview';
return segs[0];