feat(style-modal): expose Zigbee node types for customization
Add zigbee_coordinator, zigbee_router, zigbee_enddevice to the CustomStyleModal editable list with Radio/Zap/Lightbulb icons so users can tweak color, opacity, and size like any other node type.
This commit is contained in:
@@ -3,6 +3,7 @@ import { toast } from 'sonner'
|
|||||||
import {
|
import {
|
||||||
Globe, Router, Network, Server, Layers, Box, Container, HardDrive,
|
Globe, Router, Network, Server, Layers, Box, Container, HardDrive,
|
||||||
Cpu, Wifi, Camera, Printer, Monitor, PlugZap, Anchor, Package, Circle, Flame,
|
Cpu, Wifi, Camera, Printer, Monitor, PlugZap, Anchor, Package, Circle, Flame,
|
||||||
|
Radio, Zap, Lightbulb,
|
||||||
type LucideIcon,
|
type LucideIcon,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'
|
||||||
@@ -21,7 +22,8 @@ import { NODE_TYPE_LABELS, EDGE_TYPE_LABELS } from '@/types'
|
|||||||
const EDITABLE_NODE_TYPES: NodeType[] = [
|
const EDITABLE_NODE_TYPES: NodeType[] = [
|
||||||
'isp', 'router', 'firewall', 'switch', 'server', 'proxmox', 'vm', 'lxc', 'nas',
|
'isp', 'router', 'firewall', 'switch', 'server', 'proxmox', 'vm', 'lxc', 'nas',
|
||||||
'iot', 'ap', 'camera', 'printer', 'computer', 'cpl', 'docker_host',
|
'iot', 'ap', 'camera', 'printer', 'computer', 'cpl', 'docker_host',
|
||||||
'docker_container', 'generic',
|
'docker_container', 'zigbee_coordinator', 'zigbee_router', 'zigbee_enddevice',
|
||||||
|
'generic',
|
||||||
]
|
]
|
||||||
|
|
||||||
const EDITABLE_EDGE_TYPES: EdgeType[] = ['ethernet', 'wifi', 'iot', 'vlan', 'virtual', 'cluster']
|
const EDITABLE_EDGE_TYPES: EdgeType[] = ['ethernet', 'wifi', 'iot', 'vlan', 'virtual', 'cluster']
|
||||||
@@ -30,7 +32,9 @@ const NODE_ICONS: Record<string, LucideIcon> = {
|
|||||||
isp: Globe, router: Router, firewall: Flame, switch: Network, server: Server, proxmox: Layers,
|
isp: Globe, router: Router, firewall: Flame, switch: Network, server: Server, proxmox: Layers,
|
||||||
vm: Box, lxc: Container, nas: HardDrive, iot: Cpu, ap: Wifi,
|
vm: Box, lxc: Container, nas: HardDrive, iot: Cpu, ap: Wifi,
|
||||||
camera: Camera, printer: Printer, computer: Monitor, cpl: PlugZap,
|
camera: Camera, printer: Printer, computer: Monitor, cpl: PlugZap,
|
||||||
docker_host: Anchor, docker_container: Package, generic: Circle,
|
docker_host: Anchor, docker_container: Package,
|
||||||
|
zigbee_coordinator: Radio, zigbee_router: Zap, zigbee_enddevice: Lightbulb,
|
||||||
|
generic: Circle,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Default style for a node type (from default theme) ─────────────────────
|
// ── Default style for a node type (from default theme) ─────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user