From c7ae1414b9b7ea8fa1da2f46b314aa949c8f6420 Mon Sep 17 00:00:00 2001 From: librelad Date: Mon, 1 Jun 2026 00:01:59 +0100 Subject: [PATCH] feat(webui): redirect /updater into Overview; surface backup config in Admin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _legacyRedirect: /updater[/tab] -> /overview[/tab] (security/recovery/history fold into the Updates expander -> /overview/updates). /backup is intentionally NOT redirected — it stays the operational backup center (locations/migrate/ snapshots), reached from Overview › Backups. - Re-point the per-app hotfix chip to /overview/improvements. - Unhide the existing backup config category in the Admin sidebar so engine/schedule/retention config lives under Admin (same generated category the backup center binds, so edits stay in sync). Co-Authored-By: Claude Opus 4.8 --- .../components/admin/config/js/config-sidebar.js | 8 ++++---- .../frontend/components/apps/core/js/apps-manager.js | 6 +++--- containers/libreportal/frontend/core/kernel/js/spa.js | 10 ++++++++++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/containers/libreportal/frontend/components/admin/config/js/config-sidebar.js b/containers/libreportal/frontend/components/admin/config/js/config-sidebar.js index a54cec0..fcd8439 100755 --- a/containers/libreportal/frontend/components/admin/config/js/config-sidebar.js +++ b/containers/libreportal/frontend/components/admin/config/js/config-sidebar.js @@ -76,10 +76,10 @@ class ConfigSidebar { var self = this; // Preserve 'this' context categoriesArray.forEach(function(category) { - // Backup category has its own top-level page (/backup) which renders - // these same fields dynamically — hide it from the /config sidebar to - // avoid two surfaces for the same data. - if (category.id === 'backup') return; + // The backup config category (engine/schedule/retention) surfaces here in + // Admin. The operational backup center (/backup, reached from Overview › + // Backups) keeps locations, migrate and snapshots. Both bind the same + // generated category, so edits stay in sync. const categoryItem = document.createElement('div'); categoryItem.className = 'category'; diff --git a/containers/libreportal/frontend/components/apps/core/js/apps-manager.js b/containers/libreportal/frontend/components/apps/core/js/apps-manager.js index eaa4d32..4551a43 100755 --- a/containers/libreportal/frontend/components/apps/core/js/apps-manager.js +++ b/containers/libreportal/frontend/components/apps/core/js/apps-manager.js @@ -489,9 +489,9 @@ class AppsManager { chip.style.cursor = 'pointer'; chip.style.display = ''; chip.onclick = () => { - if (typeof window.navigateToRoute === 'function') window.navigateToRoute('/updater/improvements'); - else if (typeof window.spaClean === 'function') window.spaClean('/updater/improvements'); - else window.location.href = '/updater/improvements'; + if (typeof window.navigateToRoute === 'function') window.navigateToRoute('/overview/improvements'); + else if (typeof window.spaClean === 'function') window.spaClean('/overview/improvements'); + else window.location.href = '/overview/improvements'; }; } catch (_) { /* best-effort */ } } diff --git a/containers/libreportal/frontend/core/kernel/js/spa.js b/containers/libreportal/frontend/core/kernel/js/spa.js index 4fc41da..9833535 100755 --- a/containers/libreportal/frontend/core/kernel/js/spa.js +++ b/containers/libreportal/frontend/core/kernel/js/spa.js @@ -370,6 +370,16 @@ class LibrePortalSPAClean { else { const seg = p.replace(/^\/config\/?/, ''); if (seg) cat = seg; } return (typeof window.adminPath === 'function') ? window.adminPath(cat) : '/admin'; } + // The standalone Updater page is now the fleet Overview area. /updater[/tab] + // -> /overview[/tab]; security/recovery/history folded into the Updates + // expander, so they land on /overview/updates. (/backup is NOT redirected — + // it remains the operational backup center, reached from Overview › Backups.) + if (p === '/updater' || p.startsWith('/updater/')) { + const seg = p.replace(/^\/updater\/?/, ''); + if (seg === 'updates' || seg === 'improvements') return '/overview/' + seg; + if (!seg || seg === 'overview') return '/overview'; + return '/overview/updates'; + } return null; }