feat(2.0): Phase 5 — Betrieb, Observability + Politur
Backup: services/backup.py (Memory-SQLite inkl. WAL/SHM + Configs, retain 7) + deploy/backup.sh + POST /api/system/backup + GET /api/system/backups. Services-Health: GET /api/system/services (aggregierte Reachability + Observability-Links). Frontend: SystemView mit Dienste-Health + Backup- Button + Links; Theme-Toggle (Hell/Dunkel, persistent). Lokal verifiziert: Backup-Snapshot + services-Aggregat (TestClient), Frontend-Build + Browser (Light-Mode bestaetigt via computed styles). Damit Phasen 0-5 lokal fertig. Docs aktualisiert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+16
-1
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from "react"
|
||||
import { Command as CommandIcon } from "lucide-react"
|
||||
import { Command as CommandIcon, Moon, Sun } from "lucide-react"
|
||||
import { NAV, type ViewId } from "@/nav"
|
||||
import { CommandPalette } from "@/components/CommandPalette"
|
||||
import { ModelsView } from "@/views/ModelsView"
|
||||
@@ -15,6 +15,7 @@ import { cn } from "@/lib/utils"
|
||||
export default function App() {
|
||||
const [view, setView] = useState<ViewId>("models")
|
||||
const [health, setHealth] = useState<Health | null>(null)
|
||||
const [dark, setDark] = useState(() => localStorage.getItem("mc_theme") !== "light")
|
||||
|
||||
useEffect(() => {
|
||||
const load = () => api<Health>("/api/health").then(setHealth).catch(() => setHealth(null))
|
||||
@@ -23,6 +24,11 @@ export default function App() {
|
||||
return () => clearInterval(t)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
document.documentElement.classList.toggle("dark", dark)
|
||||
localStorage.setItem("mc_theme", dark ? "dark" : "light")
|
||||
}, [dark])
|
||||
|
||||
const active = NAV.find((n) => n.id === view)!
|
||||
|
||||
return (
|
||||
@@ -78,6 +84,14 @@ export default function App() {
|
||||
<div className="flex min-w-0 flex-1 flex-col">
|
||||
<header className="flex h-14 shrink-0 items-center justify-between border-b border-border px-6">
|
||||
<div className="text-sm text-muted-foreground">{active.hint}</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={() => setDark((d) => !d)}
|
||||
className="flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent"
|
||||
title="Hell/Dunkel"
|
||||
>
|
||||
{dark ? <Sun className="h-3.5 w-3.5" /> : <Moon className="h-3.5 w-3.5" />}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
const ev = new KeyboardEvent("keydown", { key: "k", metaKey: true })
|
||||
@@ -89,6 +103,7 @@ export default function App() {
|
||||
<span>Springen</span>
|
||||
<kbd className="rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]">⌘K</kbd>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main className="flex-1 overflow-y-auto p-6">
|
||||
|
||||
Reference in New Issue
Block a user