feat: consolidate routing view into models tab, and add updates widget directly to Zentrale dashboard

This commit is contained in:
Hitonabi
2026-06-25 22:24:00 +02:00
parent 6a8e55cc43
commit d15744a812
9 changed files with 481 additions and 402 deletions
+7 -5
View File
@@ -2,6 +2,7 @@ import { useEffect, useState } from "react"
import { Download, Search, Trash2, Edit3, Star, Layers, Activity, HardDrive } from "lucide-react"
import { api, type DiscoverResp, type Fit, type Job, type ModelInfo } from "@/lib/api"
import { CapsChips } from "@/components/CapsChips"
import { RoutingView } from "./RoutingView"
import { cn } from "@/lib/utils"
function fmtBytes(b?: number) {
@@ -492,7 +493,7 @@ function Discover() {
}
export function ModelsView() {
const [tab, setTab] = useState<"installed" | "discover">("installed")
const [tab, setTab] = useState<"installed" | "discover" | "routing">("installed")
return (
<div className="space-y-6">
<div className="flex flex-col sm:flex-row justify-between sm:items-center gap-4">
@@ -501,12 +502,12 @@ export function ModelsView() {
Modell-Zentrale
</h1>
<p className="text-sm text-muted-foreground">
Verwalte installierte GGUFs, weise Systemrollen zu und lade neue Modelle von HuggingFace.
Verwalte installierte GGUFs, weise Systemrollen zu, lade neue Modelle oder konfiguriere das Gateway-Routing.
</p>
</div>
<div className="flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start">
{(["installed", "discover"] as const).map((t) => (
{(["installed", "discover", "routing"] as const).map((t) => (
<button
key={t}
onClick={() => setTab(t)}
@@ -517,7 +518,7 @@ export function ModelsView() {
: "text-muted-foreground hover:text-foreground",
)}
>
{t === "installed" ? "Installiert" : "Suchen & Entdecken"}
{t === "installed" ? "Bibliothek" : t === "discover" ? "Modelle finden" : "Gateway-Routing"}
</button>
))}
</div>
@@ -526,8 +527,9 @@ export function ModelsView() {
<JobsBar />
<div className="transition-all duration-300">
{tab === "installed" ? <Installed /> : <Discover />}
{tab === "installed" ? <Installed /> : tab === "discover" ? <Discover /> : <RoutingView />}
</div>
</div>
)
}