fix: resolve TypeScript build errors blocking Docker image
- nodeColors.ts: add missing camera/printer/computer/cpl entries to Record<NodeType, NodeColors> - CanvasContainer.tsx: use ConnectionMode enum instead of bare string literal - export.ts: cast style object to Partial<CSSStyleDeclaration> for CSS custom property - Sidebar.tsx: cast suggested_type to NodeType to satisfy NodeData type
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
Background,
|
||||
Controls,
|
||||
BackgroundVariant,
|
||||
ConnectionMode,
|
||||
type Node,
|
||||
type Edge,
|
||||
type Connection,
|
||||
@@ -56,7 +57,7 @@ export function CanvasContainer({ onConnect: onConnectProp, onEdgeDoubleClick }:
|
||||
snapGrid={[16, 16]}
|
||||
fitView
|
||||
colorMode="dark"
|
||||
connectionMode="loose"
|
||||
connectionMode={ConnectionMode.Loose}
|
||||
isValidConnection={(connection) => connection.source !== connection.target}
|
||||
>
|
||||
<Background
|
||||
|
||||
@@ -165,7 +165,7 @@ function PendingDevicesPanel({ onNodeApproved }: { onNodeApproved: (nodeId: stri
|
||||
try {
|
||||
const nodeData = {
|
||||
label: device.hostname ?? device.ip,
|
||||
type: device.suggested_type ?? 'generic',
|
||||
type: (device.suggested_type ?? 'generic') as import('@/types').NodeType,
|
||||
ip: device.ip,
|
||||
hostname: device.hostname ?? undefined,
|
||||
status: 'unknown',
|
||||
|
||||
Reference in New Issue
Block a user