diff --git a/components/dashboard/dashboard-controls.tsx b/components/dashboard/dashboard-controls.tsx index 4fd0512..8e8a0a2 100644 --- a/components/dashboard/dashboard-controls.tsx +++ b/components/dashboard/dashboard-controls.tsx @@ -49,6 +49,18 @@ type Props = { >; }; +function getDomainStatusBadge(status: string | null) { + const normalized = (status ?? "unknown").toLowerCase(); + + if (normalized === "active") return "bg-emerald-100 text-emerald-700"; + + if (normalized === "suspended") return "bg-rose-100 text-rose-700"; + + if (normalized === "inactive") return "bg-amber-100 text-amber-700"; + + return "bg-slate-100 text-slate-600"; +} + export function DashboardControls({ instances, subscriptions, @@ -351,14 +363,28 @@ export function DashboardControls({ {instance.status}
- Last sync: {formatDateTime(instance.last_sync_at)} - {instance.last_sync_status - ? ` (${instance.last_sync_status})` - : ""} + Subscriptions: {instance.last_sync_subscriptions ?? 0}
- Last counts: {instance.last_sync_subscriptions ?? 0}{" "} - subscriptions, {instance.last_sync_domains ?? 0} domains + Domains: {instance.last_sync_domains ?? 0} +
++ Last sync status:{" "} + + {instance.last_sync_status ?? "unknown"} + +
++ Last sync time: {formatDateTime(instance.last_sync_at)}
Last connected:{" "} @@ -521,11 +547,15 @@ export function DashboardControls({ ) : ( filteredDomains.map((domain) => (