fix(ui): показывать неизвестный статус карты отдельно

This commit is contained in:
Denozordec committed 2026-10-01 01:39:53 +07:00
1 parent 1215cbe8ae
commit 329d6b82f7
10 files changed
+44 -12

No files matched your search

+2 -1
View File
@@ -15,6 +15,7 @@ const ZOOM_MIN = 0.2
const ZOOM_MAX = 6
const STATUS_STYLE = {
unknown: { fill: "var(--muted)", stroke: "var(--muted-foreground)", glow: "transparent" },
online: { fill: "#0f2d1f", stroke: "#4ade80", glow: "rgba(74,222,128,0.15)" },
degraded: { fill: "#2d1e06", stroke: "#fbbf24", glow: "rgba(251,191,36,0.15)" },
offline: { fill: "#2d0f0f", stroke: "#f87171", glow: "transparent" },
@@ -126,7 +127,7 @@ function ServerNode({
name: string
site: string
country: string
status: "online" | "offline" | "degraded"
status: "online" | "offline" | "degraded" | "unknown"
selected: boolean
onClick: () => void
}) {
+2
View File
@@ -6,6 +6,7 @@ const labels: Record<ServerStatus, string> = {
online: "Онлайн",
offline: "Оффлайн",
degraded: "Внимание",
unknown: "Неизвестно",
}
export function StatusBadge({ status }: { status: ServerStatus }) {
@@ -13,6 +14,7 @@ export function StatusBadge({ status }: { status: ServerStatus }) {
<span
className={cn(
"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium",
status === "unknown" && "bg-muted text-muted-foreground",
status === "online" && "bg-[var(--status-online-bg)] text-[var(--status-online-fg)]",
status === "offline" && "bg-[var(--status-offline-bg)] text-[var(--status-offline-fg)]",
status === "degraded" && "bg-[var(--status-degraded-bg)] text-[var(--status-degraded-fg)]",
+1
View File
@@ -6,6 +6,7 @@ export function StatusDot({ status, pulse }: { status: ServerStatus; pulse?: boo
<span
className={cn(
"inline-block size-2 rounded-full shrink-0",
status === "unknown" && "bg-muted-foreground",
status === "online" && "bg-[var(--status-online)]",
status === "offline" && "bg-[var(--status-offline)]",
status === "degraded" && "bg-[var(--status-degraded)]",