Merge claude/2
This commit is contained in:
commit
05e65bf4b6
@ -45,7 +45,7 @@
|
||||
</svg>
|
||||
App Center
|
||||
</a>
|
||||
<a href="/admin" class="nav-item" id="nav-config">
|
||||
<a href="/admin/dashboard" 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>
|
||||
|
||||
@ -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';
|
||||
if (!category || category === 'overview') return '/admin/dashboard'; // the admin board
|
||||
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,7 +558,8 @@ window.adminPath = function (category) {
|
||||
};
|
||||
window.adminCategoryFromPath = function (pathname) {
|
||||
const segs = String(pathname || '').replace(/^\/admin\/?/, '').split('/').filter(Boolean);
|
||||
if (!segs.length || segs[0] === 'overview') return 'overview';
|
||||
// Bare /admin and /admin/dashboard both resolve to the overview board.
|
||||
if (!segs.length || segs[0] === 'overview' || segs[0] === 'dashboard') return 'overview';
|
||||
if (segs[0] === 'config') return segs[1] || 'general';
|
||||
if (segs[0] === 'tools') return segs[1] || 'overview';
|
||||
return segs[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user