app: centralize kind→icon in one KIND_ICONS map
Every surface hand-mapped deployment kind → lucide icon, so they could (and did) drift. Add KIND_ICONS/kindIcon to lib/labels beside kindLabel, and route KindBadge (→ all detail headers/cards/sections), the Overview tiles, and the program links through it.
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
import type { LucideIcon } from "lucide-react"
|
||||
import { Box, Clock, LayoutTemplate, Package, Server, Waypoints, Wrench } from "lucide-react"
|
||||
|
||||
// Canonical kind → icon — the single source of truth so the nav, Overview tiles,
|
||||
// cards, the System map, and the command palette all speak one visual language.
|
||||
// (Colors live in KindBadge; labels/descriptions are below.) `program` is the
|
||||
// catalog pseudo-kind, not a deployment kind — the same Package glyph the
|
||||
// Programs nav entry and Overview tile use.
|
||||
export const KIND_ICONS: Record<string, LucideIcon> = {
|
||||
service: Server,
|
||||
job: Clock,
|
||||
tool: Wrench,
|
||||
static: LayoutTemplate,
|
||||
reference: Waypoints,
|
||||
program: Package,
|
||||
}
|
||||
|
||||
export function kindIcon(kind: string): LucideIcon {
|
||||
return KIND_ICONS[kind] ?? Box
|
||||
}
|
||||
|
||||
export const LAUNCHER_LABELS: Record<string, string> = {
|
||||
python: "Python",
|
||||
command: "Command",
|
||||
|
||||
Reference in New Issue
Block a user