feat: add CPL / Powerline node type with PlugZap icon
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { type NodeProps, type Node } from '@xyflow/react'
|
import { type NodeProps, type Node } from '@xyflow/react'
|
||||||
import {
|
import {
|
||||||
Globe, Router, Network, Server, Layers, Box, Container,
|
Globe, Router, Network, Server, Layers, Box, Container,
|
||||||
HardDrive, Cpu, Wifi, Circle, Cctv, Printer, Monitor,
|
HardDrive, Cpu, Wifi, Circle, Cctv, Printer, Monitor, PlugZap,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import { BaseNode } from './BaseNode'
|
import { BaseNode } from './BaseNode'
|
||||||
import type { NodeData } from '@/types'
|
import type { NodeData } from '@/types'
|
||||||
@@ -21,4 +21,5 @@ export const ApNode = (props: N) => <BaseNode {...props} icon={Wifi} />
|
|||||||
export const CameraNode = (props: N) => <BaseNode {...props} icon={Cctv} />
|
export const CameraNode = (props: N) => <BaseNode {...props} icon={Cctv} />
|
||||||
export const PrinterNode = (props: N) => <BaseNode {...props} icon={Printer} />
|
export const PrinterNode = (props: N) => <BaseNode {...props} icon={Printer} />
|
||||||
export const ComputerNode = (props: N) => <BaseNode {...props} icon={Monitor} />
|
export const ComputerNode = (props: N) => <BaseNode {...props} icon={Monitor} />
|
||||||
|
export const CplNode = (props: N) => <BaseNode {...props} icon={PlugZap} />
|
||||||
export const GenericNode = (props: N) => <BaseNode {...props} icon={Circle} />
|
export const GenericNode = (props: N) => <BaseNode {...props} icon={Circle} />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { IspNode, RouterNode, SwitchNode, ServerNode, VmNode, LxcNode, NasNode, IotNode, ApNode, CameraNode, PrinterNode, ComputerNode, GenericNode } from './index'
|
import { IspNode, RouterNode, SwitchNode, ServerNode, VmNode, LxcNode, NasNode, IotNode, ApNode, CameraNode, PrinterNode, ComputerNode, CplNode, GenericNode } from './index'
|
||||||
import { ProxmoxGroupNode } from './ProxmoxGroupNode'
|
import { ProxmoxGroupNode } from './ProxmoxGroupNode'
|
||||||
|
|
||||||
export const nodeTypes = {
|
export const nodeTypes = {
|
||||||
@@ -15,5 +15,6 @@ export const nodeTypes = {
|
|||||||
camera: CameraNode,
|
camera: CameraNode,
|
||||||
printer: PrinterNode,
|
printer: PrinterNode,
|
||||||
computer: ComputerNode,
|
computer: ComputerNode,
|
||||||
|
cpl: CplNode,
|
||||||
generic: GenericNode,
|
generic: GenericNode,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export type NodeType =
|
|||||||
| 'camera'
|
| 'camera'
|
||||||
| 'printer'
|
| 'printer'
|
||||||
| 'computer'
|
| 'computer'
|
||||||
|
| 'cpl'
|
||||||
| 'generic'
|
| 'generic'
|
||||||
|
|
||||||
export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual' | 'cluster'
|
export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual' | 'cluster'
|
||||||
@@ -73,6 +74,7 @@ export const NODE_TYPE_LABELS: Record<NodeType, string> = {
|
|||||||
camera: 'Camera',
|
camera: 'Camera',
|
||||||
printer: 'Printer',
|
printer: 'Printer',
|
||||||
computer: 'Computer',
|
computer: 'Computer',
|
||||||
|
cpl: 'CPL / Powerline',
|
||||||
generic: 'Generic Device',
|
generic: 'Generic Device',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
// Communications
|
// Communications
|
||||||
Mail, MessageSquare, Phone,
|
Mail, MessageSquare, Phone,
|
||||||
// Misc devices
|
// Misc devices
|
||||||
Printer, Smartphone, Search, Filter, BookOpen,
|
Printer, Smartphone, Search, Filter, BookOpen, PlugZap,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import type { LucideIcon } from 'lucide-react'
|
import type { LucideIcon } from 'lucide-react'
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ export const ICON_REGISTRY: IconEntry[] = [
|
|||||||
{ key: 'monitor', label: 'Workstation', category: 'Infrastructure', icon: Monitor },
|
{ key: 'monitor', label: 'Workstation', category: 'Infrastructure', icon: Monitor },
|
||||||
{ key: 'smartphone', label: 'Phone / Mobile', category: 'Infrastructure', icon: Smartphone },
|
{ key: 'smartphone', label: 'Phone / Mobile', category: 'Infrastructure', icon: Smartphone },
|
||||||
{ key: 'printer', label: 'Printer', category: 'Infrastructure', icon: Printer },
|
{ key: 'printer', label: 'Printer', category: 'Infrastructure', icon: Printer },
|
||||||
|
{ key: 'plugzap', label: 'CPL / Powerline', category: 'Infrastructure', icon: PlugZap },
|
||||||
|
|
||||||
// --- Media ---
|
// --- Media ---
|
||||||
{ key: 'play', label: 'Jellyfin / Emby', category: 'Media', icon: Play },
|
{ key: 'play', label: 'Jellyfin / Emby', category: 'Media', icon: Play },
|
||||||
|
|||||||
Reference in New Issue
Block a user