Feature: HTMX + Jinja2 Frontend ersetzt Next.js komplett

- Kein Node.js, kein npm, kein Build-Schritt mehr
- HTMX 2.0.4 + PicoCSS 2 vendored in backend/static/
- Jinja2 Templates für alle 9 Seiten (Dashboard, ZFS, Snapshots,
  Shares, Identities, Logs, Services, Navigator, Login)
- HTMX Fragments für Live-Updates (30s Polling Dashboard)
- JWT als httpOnly Cookie statt localStorage
- Disk Usage zeigt TB/PB korrekt (Jinja2 serverseitig formatiert)
- Update-safe: nur Python-Deps, keine npm-Abhängigkeiten

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 18:45:46 +02:00
parent 654df5b98f
commit 5ecd143535
44 changed files with 1123 additions and 6129 deletions
+52
View File
@@ -0,0 +1,52 @@
{% extends "base.html" %}
{% block title %}Identities ZMB Webui{% endblock %}
{% block content %}
<h2>Benutzer &amp; Gruppen</h2>
<div style="display:flex;gap:0.5rem;margin-bottom:1.5rem;border-bottom:1px solid var(--pico-muted-border-color);padding-bottom:0.5rem">
<button onclick="showTab('users')" id="tab-users" class="outline">Benutzer</button>
<button onclick="showTab('groups')" id="tab-groups" class="outline secondary">Gruppen</button>
</div>
<!-- Users -->
<div id="panel-users">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem">
<h3 style="margin:0">Systembenutzer</h3>
<button onclick="document.getElementById('new-user-form').style.display='block'">&#43; Neu</button>
</div>
<div id="new-user-form" style="display:none;margin-bottom:1rem">
<article>
<h4>Neuer Benutzer</h4>
<form hx-post="/api/identities/users" hx-target="#user-list" hx-swap="innerHTML"
hx-on::after-request="this.reset();document.getElementById('new-user-form').style.display='none'">
<div style="display:grid;grid-template-columns:1fr 1fr;gap:1rem">
<div><label>Benutzername</label><input name="username" required></div>
<div><label>Passwort</label><input name="password" type="password" required></div>
</div>
<div class="actions"><button type="submit">Erstellen</button><button type="button" class="outline secondary" onclick="document.getElementById('new-user-form').style.display='none'">Abbrechen</button></div>
</form>
</article>
</div>
<div id="user-list" hx-get="/fragments/users" hx-trigger="load">
<p aria-busy="true">Lade...</p>
</div>
</div>
<!-- Groups -->
<div id="panel-groups" style="display:none">
<div id="group-list" hx-get="/fragments/groups" hx-trigger="load">
<p aria-busy="true">Lade...</p>
</div>
</div>
<script>
function showTab(name) {
['users','groups'].forEach(t => {
document.getElementById('panel-' + t).style.display = t === name ? 'block' : 'none';
document.getElementById('tab-' + t).className = t === name ? 'outline' : 'outline secondary';
});
}
</script>
{% endblock %}