feat(ui): Frontend MVP — React 19 + AntD 6 + Vite + StaticFS-Wiring
Scaffold und Core-Infrastruktur 1:1 nach enconf-Pattern (netcell- webpanel/management-ui), reduziert auf EdgeGuard-Scope (kein reseller/ customer-Roles, keine codemirror/extensions). Stack: React 19 + AntD 6 + TS strict + Vite + TanStack-Query + zustand + react-i18next. Layout: AppLayout (Sider+Header+Content), Sidebar (Dashboard/Domains), Header (User-Dropdown + Logout). i18n mit de/en common.json. Pages: Login (POST /auth/login), Setup-Wizard (POST /setup/complete), Dashboard (Health-Polling + Statistics), Domains (volles CRUD via TanStack-Query gegen /domains-API). UpdateBanner-Komponente (/system/package-versions, alle 5 min poll, /system/upgrade trigger) ist von Tag 1 wie vom User gefordert eingebaut. API-Wiring: cmd/edgeguard-api/main.go mountUI() — gin StaticFS für /usr/share/edgeguard/ui/ (overridebar via EDGEGUARD_UI_DIR), echte Files werden direkt geserved, alle nicht-API-Pfade fallen via NoRoute auf index.html für React-Router-SPA. Wenn dist/ fehlt: HTML-Placeholder mit Build-Hinweis. Verifiziert: bun install + npx tsc -b strict (0 errors) + bun run build (12 chunks). End-to-end gegen /tmp/eg-api: / serviert echte React-index.html, /domains SPA-Fallback, /api/v1/* JSON, /assets/* direkt, /api/v1/nonexistent korrekt 404. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
72
management-ui/src/i18n/locales/de/common.json
Normal file
72
management-ui/src/i18n/locales/de/common.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"app": {
|
||||
"title": "EdgeGuard",
|
||||
"subtitle": "Native Reverse-Proxy / VPN / Firewall"
|
||||
},
|
||||
"nav": {
|
||||
"dashboard": "Dashboard",
|
||||
"domains": "Domains",
|
||||
"backends": "Backends",
|
||||
"routing": "Routing",
|
||||
"ssl": "SSL-Zertifikate",
|
||||
"vpn": "VPN",
|
||||
"firewall": "Firewall",
|
||||
"cluster": "Cluster",
|
||||
"settings": "Einstellungen"
|
||||
},
|
||||
"auth": {
|
||||
"loginTitle": "Anmelden",
|
||||
"email": "E-Mail",
|
||||
"password": "Passwort",
|
||||
"login": "Anmelden",
|
||||
"logout": "Abmelden",
|
||||
"loginFailed": "Anmeldung fehlgeschlagen",
|
||||
"loggedInAs": "Angemeldet als"
|
||||
},
|
||||
"setup": {
|
||||
"title": "Erst-Einrichtung",
|
||||
"intro": "Lege den Admin-Account an, gib die öffentliche FQDN an und – optional – einen Lizenzschlüssel. Ohne Lizenz startet eine 30-Tage-Trial.",
|
||||
"adminEmail": "Admin-E-Mail",
|
||||
"adminPassword": "Admin-Passwort",
|
||||
"passwordRule": "Mindestens 12 Zeichen.",
|
||||
"fqdn": "Öffentliche FQDN",
|
||||
"acmeEmail": "ACME-/Let's-Encrypt-E-Mail",
|
||||
"licenseKey": "Lizenzschlüssel (optional)",
|
||||
"submit": "Setup abschließen",
|
||||
"successTitle": "Setup abgeschlossen",
|
||||
"successHint": "Du wirst zur Anmeldung weitergeleitet."
|
||||
},
|
||||
"dashboard": {
|
||||
"title": "Dashboard",
|
||||
"welcomeHint": "Übersicht aller laufenden EdgeGuard-Komponenten."
|
||||
},
|
||||
"domains": {
|
||||
"title": "Domains",
|
||||
"addDomain": "Domain hinzufügen",
|
||||
"editDomain": "Domain bearbeiten",
|
||||
"name": "Name",
|
||||
"active": "Aktiv",
|
||||
"primaryBackend": "Primary-Backend",
|
||||
"httpToHttps": "HTTP→HTTPS",
|
||||
"hsts": "HSTS",
|
||||
"notes": "Notizen",
|
||||
"actions": "Aktionen",
|
||||
"edit": "Bearbeiten",
|
||||
"delete": "Löschen",
|
||||
"deleteConfirm": "Domain {{name}} wirklich löschen?"
|
||||
},
|
||||
"update": {
|
||||
"available": "Update verfügbar: {{pkg}} {{installed}} → {{available}}",
|
||||
"applyNow": "Jetzt aktualisieren",
|
||||
"applying": "Update läuft …",
|
||||
"started": "Update wurde gestartet — der Server wird in Kürze neu starten."
|
||||
},
|
||||
"common": {
|
||||
"yes": "Ja",
|
||||
"no": "Nein",
|
||||
"save": "Speichern",
|
||||
"cancel": "Abbrechen",
|
||||
"loading": "Lädt …",
|
||||
"error": "Fehler"
|
||||
}
|
||||
}
|
||||
72
management-ui/src/i18n/locales/en/common.json
Normal file
72
management-ui/src/i18n/locales/en/common.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"app": {
|
||||
"title": "EdgeGuard",
|
||||
"subtitle": "Native reverse-proxy / VPN / firewall"
|
||||
},
|
||||
"nav": {
|
||||
"dashboard": "Dashboard",
|
||||
"domains": "Domains",
|
||||
"backends": "Backends",
|
||||
"routing": "Routing",
|
||||
"ssl": "SSL certificates",
|
||||
"vpn": "VPN",
|
||||
"firewall": "Firewall",
|
||||
"cluster": "Cluster",
|
||||
"settings": "Settings"
|
||||
},
|
||||
"auth": {
|
||||
"loginTitle": "Sign in",
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"login": "Sign in",
|
||||
"logout": "Sign out",
|
||||
"loginFailed": "Sign-in failed",
|
||||
"loggedInAs": "Signed in as"
|
||||
},
|
||||
"setup": {
|
||||
"title": "First-time setup",
|
||||
"intro": "Create the admin account, declare the public FQDN, and — optionally — paste a license key. Without one, a 30-day trial starts.",
|
||||
"adminEmail": "Admin email",
|
||||
"adminPassword": "Admin password",
|
||||
"passwordRule": "At least 12 characters.",
|
||||
"fqdn": "Public FQDN",
|
||||
"acmeEmail": "ACME / Let's Encrypt email",
|
||||
"licenseKey": "License key (optional)",
|
||||
"submit": "Finish setup",
|
||||
"successTitle": "Setup complete",
|
||||
"successHint": "Redirecting you to sign-in."
|
||||
},
|
||||
"dashboard": {
|
||||
"title": "Dashboard",
|
||||
"welcomeHint": "Overview of all running EdgeGuard components."
|
||||
},
|
||||
"domains": {
|
||||
"title": "Domains",
|
||||
"addDomain": "Add domain",
|
||||
"editDomain": "Edit domain",
|
||||
"name": "Name",
|
||||
"active": "Active",
|
||||
"primaryBackend": "Primary backend",
|
||||
"httpToHttps": "HTTP→HTTPS",
|
||||
"hsts": "HSTS",
|
||||
"notes": "Notes",
|
||||
"actions": "Actions",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"deleteConfirm": "Really delete domain {{name}}?"
|
||||
},
|
||||
"update": {
|
||||
"available": "Update available: {{pkg}} {{installed}} → {{available}}",
|
||||
"applyNow": "Apply now",
|
||||
"applying": "Update in progress …",
|
||||
"started": "Update has started — the server will restart shortly."
|
||||
},
|
||||
"common": {
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"save": "Save",
|
||||
"cancel": "Cancel",
|
||||
"loading": "Loading …",
|
||||
"error": "Error"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user