feat: per-node custom color styling (border, background, icon)

- Add resolveNodeColors() utility merging type defaults with per-node overrides
- Default colors per node type (cyan=isp/router/lxc/ap, green=switch/nas,
  purple=server/vm, orange=proxmox, amber=iot, gray=generic)
- Remove glowColor prop from BaseNode — colors now come from node data
- ProxmoxGroupNode uses resolveNodeColors for group border/header/icon
- NodeModal: Appearance section with 3 color swatches (border, background, icon)
  — click swatch to open native color picker; Reset to defaults button
- custom_colors persisted as JSON in DB (backend model + schemas + migration)
- 7 new unit tests for resolveNodeColors covering all node types + partial overrides
This commit is contained in:
Pouzor
2026-03-07 14:31:05 +01:00
parent 0fe3c6390a
commit 37c963cf96
12 changed files with 174 additions and 32 deletions
+2
View File
@@ -20,6 +20,7 @@ class NodeBase(BaseModel):
pos_y: float = 0
parent_id: str | None = None
container_mode: bool = False
custom_colors: dict | None = None
class NodeCreate(NodeBase):
@@ -41,6 +42,7 @@ class NodeUpdate(BaseModel):
pos_x: float | None = None
pos_y: float | None = None
container_mode: bool | None = None
custom_colors: dict | None = None
class NodeResponse(NodeBase):