librelad e1794069cb feat(webui): add App Updater feature (versions, CVEs, disaster recovery)
New self-contained feature in features/updater/ (mirrors the backup feature):
- index.js + feature.json (auto-discovered; routes /updater + sub-tabs).
- updater-page.js: 5 tabs — Overview (update/CVE/recovery counts), Updates
  (per-app current->available + Update/Update-all), Security (CVEs by severity,
  links to NVD), Recovery (per-app rollback points; snapshot-before-update),
  History. Reads /data/updater/generated/{updates,cves,history}.json; falls
  back to the installed-apps list so it's useful before the first scan. All
  actions route through services.tasks (updater_check/apply/apply_all/rollback)
  — no new mutating API.
- updater.css (self-contained, teal --page-updater hue) + updater-content.html.
- New topbar 'Updates' nav button (nav-updater) + active-highlighting in
  topbar.js + spa.js. Kernel: setupRoutesFromManifest now allows module-only
  features (no legacy handler) — this is the first such feature.

Backend generator + 'libreportal updater' task land next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-30 02:45:40 +01:00

129 lines
6.1 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LibrePortal - Modern Docker Management</title>
<link rel="icon" type="image/svg+xml" href="/icons/libreportal.svg">
<link rel="icon" type="image/x-icon" href="/icons/favicon.ico" sizes="any">
<link rel="apple-touch-icon" href="/icons/libreportal.svg">
<!-- Styles -->
<!-- Base token layer (theme-agnostic): --font-mono, --page-* identity hues -->
<link rel="stylesheet" href="/shared/css/tokens.css">
<link rel="stylesheet" href="/css/themes.css">
<link rel="stylesheet" href="/css/loading-screen.css">
<link rel="stylesheet" href="/css/setup-wizard.css">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/features/admin/ip-whitelist.css">
<link rel="stylesheet" href="/features/apps/port-manager.css">
<link rel="stylesheet" href="/features/backup/backup.css">
<link rel="stylesheet" href="/features/admin/ssh.css">
<link rel="stylesheet" href="/features/admin/admin.css">
<link rel="stylesheet" href="/features/apps/services.css">
<link rel="stylesheet" href="/css/modal.css">
<link rel="stylesheet" href="/features/apps/tools.css">
<link rel="stylesheet" href="/features/apps/routing.css">
<link rel="stylesheet" href="/css/login.css">
<link rel="stylesheet" href="/css/aurora-background.css">
<link rel="stylesheet" href="/css/topbar.css">
<link rel="stylesheet" href="/css/sidebar.css">
<link rel="stylesheet" href="/features/apps/apps-layout.css">
<link rel="stylesheet" href="/features/apps/apps.css">
<link rel="stylesheet" href="/shared/css/forms.css">
<link rel="stylesheet" href="/shared/css/config.css">
<link rel="stylesheet" href="/features/apps/service-buttons.css">
<link rel="stylesheet" href="/features/dashboard/dashboard.css">
<link rel="stylesheet" href="/features/tasks/tasks.css">
<link rel="stylesheet" href="/features/updater/updater.css">
<link rel="stylesheet" href="/css/update-notifier.css">
<script>
// Inline data-theme bootstrap — runs before any rendering so the right
// palette tokens resolve on first paint. Synchronously injects a
// <link> to the saved theme's CSS (which lives at
// /themes/<name>/theme.css) so even the very first frame paints with
// the correct palette. ThemeRegistry below additionally <link>s every
// discovered theme so the dropdown can switch between them without
// another fetch.
(function () {
var legacy = localStorage.getItem('selectedTheme');
if (legacy && !localStorage.getItem('theme')) localStorage.setItem('theme', legacy);
if (legacy) localStorage.removeItem('selectedTheme');
var theme = localStorage.getItem('theme');
if (theme === 'dark' || theme === 'blue') theme = 'dark-blue';
if (!theme) theme = 'nebula';
localStorage.setItem('theme', theme);
document.documentElement.setAttribute('data-theme', theme);
// Synchronous <link> injection. Inserted via document.write so the
// parser blocks on this stylesheet — guarantees first paint has
// the palette tokens defined. Marked with data-theme-css="<name>"
// so ThemeRegistry can detect and skip duplicates.
document.write(
'<link rel="stylesheet" href="/themes/' + theme +
'/theme.css" data-theme-css="' + theme + '">'
);
})();
</script>
<script src="/js/system/theme-registry.js"></script>
<script src="/js/system/custom-select.js"></script>
<script src="/js/system/custom-number.js"></script>
</head>
<body>
<!-- Topbar Container -->
<div id="topbar-container">
<!-- Topbar will be loaded here -->
</div>
<!-- Main Content Container -->
<main id="main-content" class="main">
<div id="app-content">
<!-- App content will be loaded here -->
</div>
</main>
<!-- Scripts -->
<!-- Auth must load first — gates all other initialization -->
<script src="/js/system/auth-manager.js"></script>
<!-- Essential Bootstrap -->
<!-- LpUi runs first so body.lp-ui--advanced / lp-ui--dev are set
before any page/component renders → no FOUC of advanced sections. -->
<script src="/js/utils/lp-ui.js"></script>
<script src="/js/utils/dom-helpers.js"></script>
<script src="/js/utils/ui-helpers.js"></script>
<script src="/js/utils/router.js"></script>
<script src="/js/utils/data-loader.js"></script>
<script src="/js/utils/system-live.js"></script>
<script src="/js/utils/dismissible.js"></script>
<script src="/js/components/eo-modal.js"></script>
<script src="/shared/task/task-refresh-coordinator.js"></script>
<script src="/features/dashboard/dashboard.js"></script>
<script src="/js/system/system-loader.js"></script>
<script src="/js/system/loading-ui.js"></script>
<script src="/js/system/setup-detector.js"></script>
<script src="/js/system/setup-wizard.js"></script>
<script src="/js/system/setup-completion-watcher.js"></script>
<script src="/js/system/system-orchestrator.js"></script>
<!-- Feature-module kernel. Currently passive: defines window.LP.features and
loads the page manifest; spa.js consults it for routing. See
docs/frontend-modularization.md. -->
<script src="/kernel/feature-registry.js"></script>
<script src="/kernel/services.js"></script>
<script src="/kernel/lifecycle.js"></script>
<!-- Feature modules are NOT listed here: the kernel loads each feature's
self-registering index.js from the manifest (features/manifest.dev.json)
before routing. Adding a page = drop a features/<id>/ folder + a manifest
entry, no index.html edit. Heavy controllers stay lazy (loaded by mount). -->
<!--
Page-specific controllers are loaded on demand by spa.js / config-manager.js
when the user navigates to the relevant route. Keeping them out of the
initial <script> block trims ~200 KB raw (~50 KB gzipped) off the cold-load
cost AND avoids parsing them up front on the dashboard, which most users
land on. Each handler's loadScript() call is idempotent — subsequent
navigations to the same route are free.
-->
<script src="/js/spa.js"></script>
</body>
</html>