feat: consolidate routing view into models tab, and add updates widget directly to Zentrale dashboard
This commit is contained in:
@@ -4,7 +4,6 @@ import { NAV, type ViewId } from "@/nav"
|
||||
import { CommandPalette } from "@/components/CommandPalette"
|
||||
import { DashboardView } from "@/views/DashboardView"
|
||||
import { ModelsView } from "@/views/ModelsView"
|
||||
import { RoutingView } from "@/views/RoutingView"
|
||||
import { SystemView } from "@/views/SystemView"
|
||||
import { ConnectView } from "@/views/ConnectView"
|
||||
import { MemoryView } from "@/views/MemoryView"
|
||||
@@ -41,6 +40,12 @@ export default function App() {
|
||||
localStorage.setItem("mc_theme", dark ? "dark" : "light")
|
||||
}, [dark])
|
||||
|
||||
useEffect(() => {
|
||||
const handleOpen = () => setDrawerOpen(true)
|
||||
window.addEventListener("open-system-drawer", handleOpen)
|
||||
return () => window.removeEventListener("open-system-drawer", handleOpen)
|
||||
}, [])
|
||||
|
||||
const active = NAV.find((n) => n.id === view)!
|
||||
const totalUpdates = updates ? (updates.os + updates.engine + updates.models) : 0
|
||||
|
||||
@@ -182,17 +187,17 @@ export default function App() {
|
||||
<main className="flex-1 overflow-y-auto p-6 scrollbar-thin">
|
||||
{view === "dashboard" && <DashboardView />}
|
||||
{view === "models" && <ModelsView />}
|
||||
{view === "routing" && <RoutingView />}
|
||||
{view === "system" && <SystemView />}
|
||||
{view === "connect" && <ConnectView />}
|
||||
{view === "memory" && <MemoryView />}
|
||||
{view === "agent" && <AgentView />}
|
||||
{!["dashboard", "models", "routing", "system", "connect", "memory", "agent"].includes(view) && (
|
||||
{!["dashboard", "models", "system", "connect", "memory", "agent"].includes(view) && (
|
||||
<Placeholder title={active.label} hint={active.hint} />
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user