Compare commits

...

2 Commits

Author SHA1 Message Date
librelad
c1ab09f406 Merge claude/1 2026-06-01 00:10:30 +01:00
librelad
dfd4ffa268 feat(webui): drop Updates & Backups top-nav items; fold into App Center
The fleet Overview area (Overview · Updates · Improvements · Backups) and the
backup center now live under App Center, so the standalone top-nav items are
redundant. Top nav is now Dashboard · App Center · Admin · Tasks.

- Remove the Backups and Updates anchors from topbar.html.
- Remove the nav{} blocks from updater/backup feature.json + manifest (so they
  don't resurface when the nav kernel lands).
- Highlight App Center for /overview and /backup; drop the dead /updater branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 00:10:30 +01:00
6 changed files with 6 additions and 38 deletions

View File

@ -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
} }

View File

@ -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
} }
] ]

View File

@ -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."
} }

View File

@ -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';
} }

View File

@ -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">

View File

@ -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 {