librelad fab6997cd7 refactor(webui): path-based Admin routing (/admin/config/<x>, /admin/tools/ssh-access)
Replace the Admin area's ?= query URLs with clean, hierarchical paths that
mirror the breadcrumb:
  /admin                  -> Overview
  /admin/config/<category>-> Config / <category>
  /admin/tools/ssh-access -> Tools / SSH Access

New /admin (+ /admin*) SPA route -> handleAdmin, which parses the path via the
shared window.adminPath / window.adminCategoryFromPath helpers and renders
through the existing ConfigManager. Legacy /config, /config?=<x> and /ssh now
redirect into the matching /admin path, so old links/bookmarks keep working
(server already serves index.html for any depth). Sidebar, Admin Overview,
dashboard link and top-nav now build /admin paths; active-nav + config data
loading recognise /admin across spa.js, topbar.js, router.js, data-loader.js.

Scope: Admin area only — /app, /apps, /tasks, /backup keep their existing ?=
URLs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-23 18:36:06 +01:00

59 lines
2.3 KiB
HTML
Executable File

<!-- Topbar Component -->
<div id="topbar-container"></div>
<!-- Main content -->
<div class="main dashboard-main">
<div class="dashboard-stats">
<div class="stat-card">
<div class="stat-number" id="installed-count">0</div>
<div class="stat-label">Installed Apps</div>
</div>
<div class="stat-card">
<div class="disk-chart">
<div class="disk-circle-container">
<div class="disk-circle-fill" id="disk-circle-fill"></div>
<div class="disk-percentage" id="disk-percent">0%</div>
</div>
</div>
<div class="chart-label">
<div class="chart-text">Disk Used</div>
</div>
</div>
<div class="stat-card system-info-card">
<div class="system-details">
<div class="system-item">
<span class="system-label">OS:</span>
<span class="system-value" id="system-info">Loading...</span>
</div>
<div class="system-item">
<span class="system-label">Uptime:</span>
<span class="system-value" id="uptime-info">Loading...</span>
</div>
<div class="system-item">
<span class="system-label">Memory:</span>
<span class="system-value" id="memory-info">Loading...</span>
</div>
</div>
<button class="system-refresh-btn" id="system-refresh-btn" aria-label="Refresh system info">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M23 4v6h-6"></path>
<path d="M1 20v-6h6"></path>
<path d="M3.51 9a9 9 0 0 1 14.85-3.36M20.49 15a9 9 0 0 1-14.85 3.36"></path>
</svg>
<div class="system-refresh-tooltip" id="update-countdown"></div>
</button>
</div>
</div>
<a href="/admin" class="dashboard-admin-link">
Admin overview
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</a>
<!-- Installed Apps Icons -->
<div id="frontpage-apps-section" class="frontpage-apps-section" style="display:none;">
<div id="frontpage-apps-container" class="frontpage-apps-grid"></div>
</div>
</div>