UI Updates

This commit is contained in:
Logan
2026-04-19 15:22:29 -04:00
parent 03212fca51
commit 0df53df92e
7 changed files with 181 additions and 13 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import { CallRow } from "@/components/CallRow";
import { NodeConfigModal } from "@/components/NodeConfigModal";
import { useState } from "react";
import type { NodeRecord } from "@/lib/types";
import { useAuth } from "@/components/AuthProvider";
function StatCard({ label, value, accent }: { label: string; value: string | number; accent?: string }) {
return (
@@ -26,6 +27,7 @@ export default function DashboardPage() {
const { systems, error: systemsError } = useSystems();
const [configNode, setConfigNode] = useState<NodeRecord | null>(null);
const { isAdmin } = useAuth();
const systemMap = Object.fromEntries(systems.map((s) => [s.system_id, s]));
const onlineCount = nodes.filter((n) => n.status !== "offline").length;
@@ -98,7 +100,7 @@ export default function DashboardPage() {
</thead>
<tbody>
{calls.map((c) => (
<CallRow key={c.call_id} call={c} systemName={systemMap[c.system_id ?? ""]?.name} />
<CallRow key={c.call_id} call={c} systemName={systemMap[c.system_id ?? ""]?.name} isAdmin={isAdmin} />
))}
</tbody>
</table>