feat: add printer and computer node types with icons

This commit is contained in:
Pouzor
2026-03-08 17:48:53 +01:00
parent c6fe984511
commit 3312742f4c
3 changed files with 12 additions and 4 deletions
@@ -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, HardDrive, Cpu, Wifi, Circle, Cctv, Printer, Monitor,
} from 'lucide-react' } from 'lucide-react'
import { BaseNode } from './BaseNode' import { BaseNode } from './BaseNode'
import type { NodeData } from '@/types' import type { NodeData } from '@/types'
@@ -19,4 +19,6 @@ export const NasNode = (props: N) => <BaseNode {...props} icon={HardDrive} /
export const IotNode = (props: N) => <BaseNode {...props} icon={Cpu} /> export const IotNode = (props: N) => <BaseNode {...props} icon={Cpu} />
export const ApNode = (props: N) => <BaseNode {...props} icon={Wifi} /> 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 ComputerNode = (props: N) => <BaseNode {...props} icon={Monitor} />
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, GenericNode } from './index' import { IspNode, RouterNode, SwitchNode, ServerNode, VmNode, LxcNode, NasNode, IotNode, ApNode, CameraNode, PrinterNode, ComputerNode, GenericNode } from './index'
import { ProxmoxGroupNode } from './ProxmoxGroupNode' import { ProxmoxGroupNode } from './ProxmoxGroupNode'
export const nodeTypes = { export const nodeTypes = {
@@ -13,5 +13,7 @@ export const nodeTypes = {
iot: IotNode, iot: IotNode,
ap: ApNode, ap: ApNode,
camera: CameraNode, camera: CameraNode,
printer: PrinterNode,
computer: ComputerNode,
generic: GenericNode, generic: GenericNode,
} }
+4
View File
@@ -10,6 +10,8 @@ export type NodeType =
| 'iot' | 'iot'
| 'ap' | 'ap'
| 'camera' | 'camera'
| 'printer'
| 'computer'
| 'generic' | 'generic'
export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual' | 'cluster' export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual' | 'cluster'
@@ -69,6 +71,8 @@ export const NODE_TYPE_LABELS: Record<NodeType, string> = {
iot: 'IoT Device', iot: 'IoT Device',
ap: 'Access Point', ap: 'Access Point',
camera: 'Camera', camera: 'Camera',
printer: 'Printer',
computer: 'Computer',
generic: 'Generic Device', generic: 'Generic Device',
} }