Apply the approved "The Hub" redesign to the web admin while keeping every existing mechanic intact (polling, service-detail modals, Matrix and system password management, NWC wallet manager, update/rebuild/backup/security/ reboot flows, feature manager, onboarding, role handling). Layout (templates/index.html): - Old header bar + IP bar replaced by a sidebar + topbar app shell. Sidebar carries the brand (The Hub / Sovran_SystemsOS version), category navigation with live counts, the System actions (Update System, Tech Support, Manual Backup, Security, node-only Upgrade), Feature Manager / Preferences, and the role badge. - Topbar carries the page title, a service search box, the LAN | WAN network chip (external IP always visible, one line), Reboot and Sign Out. - New widgets row: Systems Operational summary (opens the new Systems Operational modal) and Bitcoin Core sync progress with block/ETA. - New Systems Operational modal: service counts, router port-forwarding steps (80/443 to this machine's LAN IP), the live domain diagnostics checklist, and which services use those ports. New static/js/dashboard.js (namespaced IIFE, no new globals) renders the nav, search filtering, widgets, and the Systems Operational modal; it is driven by the existing /api/services payloads via a window.dashboardServicesUpdated() hook called from buildTiles/updateTiles. Visual design (static/css/*): - New token set (softer dark surfaces, lifted contrast, Sovran green reserved for status and actions) with legacy variable names aliased so every secondary sheet re-skins automatically. - Tiles, dialogs, buttons, inputs, toggles, tables, forms, overlays and the login page restyled to the GNOME/libadwaita-flavored surfaces: 20px cards, 26px dialogs, pill buttons, libadwaita switches, mono value pills with Copy buttons, consistent modal anatomy. - Inline SVG symbol set for chrome/nav icons (monochrome, currentColor); service icons still load from /static/icons/*.svg as before. - Sidebar system buttons now use vector glyphs instead of emoji. Behavioral details: - Service detail modal header gains a status pill next to the version chip; credentials render with pre-wrap for multiline values. - First-login security banner now renders as a card inside the content area instead of a full-width strip above the app. - Search + category filtering hide/show sections and tiles without touching the polling or update logic. Onboarding and login pages rebranded to "The Hub" with aligned palette.
85 lines
2.7 KiB
HTML
85 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>The Hub — Login</title>
|
|
<link rel="stylesheet" href="/static/css/base.css?v={{ asset_version }}" />
|
|
<link rel="stylesheet" href="/static/css/buttons.css?v={{ asset_version }}" />
|
|
</head>
|
|
<body>
|
|
<div class="login-wrapper">
|
|
<div class="login-card">
|
|
<div class="login-header">
|
|
<img src="/static/sovran-hub-icon.svg" alt="The Hub" class="login-logo" />
|
|
<div class="login-title">The <em>Hub</em></div>
|
|
<div class="login-sub">Sovran_SystemsOS</div>
|
|
</div>
|
|
|
|
<form class="login-form" id="login-form" onsubmit="return false;">
|
|
<div class="form-group">
|
|
<label for="password">Password</label>
|
|
<input
|
|
type="password"
|
|
id="password"
|
|
name="password"
|
|
autocomplete="current-password"
|
|
autofocus
|
|
placeholder="Enter your Hub password"
|
|
/>
|
|
</div>
|
|
|
|
<div class="login-error" id="login-error">Incorrect password. Please try again.</div>
|
|
|
|
<button type="submit" class="btn btn-login" id="btn-login">Sign In</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
(function () {
|
|
var form = document.getElementById('login-form');
|
|
var input = document.getElementById('password');
|
|
var errEl = document.getElementById('login-error');
|
|
var btnEl = document.getElementById('btn-login');
|
|
|
|
form.addEventListener('submit', function () {
|
|
var password = input.value;
|
|
if (!password) return;
|
|
|
|
btnEl.disabled = true;
|
|
btnEl.textContent = 'Signing in…';
|
|
errEl.classList.remove('visible');
|
|
|
|
fetch('/api/login', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({ password: password }),
|
|
credentials: 'same-origin',
|
|
})
|
|
.then(function (res) {
|
|
if (res.ok) {
|
|
window.location.replace('/');
|
|
} else {
|
|
return res.json().then(function (data) {
|
|
errEl.textContent = (data && data.detail) ? data.detail : 'Incorrect password. Please try again.';
|
|
errEl.classList.add('visible');
|
|
input.value = '';
|
|
input.focus();
|
|
btnEl.disabled = false;
|
|
btnEl.textContent = 'Sign In';
|
|
});
|
|
}
|
|
})
|
|
.catch(function () {
|
|
errEl.textContent = 'Network error. Please try again.';
|
|
errEl.classList.add('visible');
|
|
btnEl.disabled = false;
|
|
btnEl.textContent = 'Sign In';
|
|
});
|
|
});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|