diff --git a/sundynix-desktop/frontend/src/index.css b/sundynix-desktop/frontend/src/index.css index 0991970..7077c8d 100644 --- a/sundynix-desktop/frontend/src/index.css +++ b/sundynix-desktop/frontend/src/index.css @@ -89,3 +89,34 @@ body { } /* 输入控件随主题(color-scheme 由 :root/.dark 设定,控件自动继承) */ + +/* react-flow 画布主题化:控件/连线/迷你图与设计系统对齐(colorMode 已处理大半,此处精修) */ +.react-flow__controls { + box-shadow: none; + border: 1px solid rgb(var(--line)); + border-radius: 8px; + overflow: hidden; +} +.react-flow__controls-button { + background: rgb(var(--ink-900)); + border-bottom: 1px solid rgb(var(--line)); + color: rgb(var(--slate-400)); +} +.react-flow__controls-button:hover { + background: rgb(var(--ink-800)); +} +.react-flow__controls-button svg { + fill: currentColor; +} +.react-flow__edge-path { + stroke: rgb(var(--slate-600)); + stroke-width: 1.5; +} +.react-flow__edge.selected .react-flow__edge-path, +.react-flow__edge:focus .react-flow__edge-path { + stroke: #8b5cf6; +} +.react-flow__minimap { + border: 1px solid rgb(var(--line)); + border-radius: 8px; +} diff --git a/sundynix-desktop/frontend/src/studio/StudioView.tsx b/sundynix-desktop/frontend/src/studio/StudioView.tsx index f7d5131..88316c3 100644 --- a/sundynix-desktop/frontend/src/studio/StudioView.tsx +++ b/sundynix-desktop/frontend/src/studio/StudioView.tsx @@ -20,6 +20,7 @@ import { NODE_KINDS, NODE_ORDER } from "./nodeCatalog"; import { exportDsl, validate, type Issue, type TaskDsl } from "../lib/dsl"; import type { RunPhase } from "../lib/run"; import { listKb, listChatModels, listAgents, saveAgent, deleteAgent, type Identity, type AgentInfo } from "../lib/api"; +import { useTheme } from "../lib/theme"; import { Button, Input, cn, useToast } from "../ui"; let seq = 0; @@ -50,6 +51,7 @@ function buildExample(): { nodes: Node[]; edges: Edge[] } { // 编排 Studio:左(节点面板 + 我的编排) · 中画布 · 右检查器 · 顶工具栏。 export function StudioView({ onRun, phase, identity }: { onRun: (dsl: TaskDsl) => void; phase: RunPhase; identity: Identity }) { const toast = useToast(); + const { theme } = useTheme(); const [nodes, setNodes, onNodesChange] = useNodesState([]); const [edges, setEdges, onEdgesChange] = useEdgesState([]); const [selId, setSelId] = useState(null); @@ -263,7 +265,8 @@ export function StudioView({ onRun, phase, identity }: { onRun: (dsl: TaskDsl) = - + - + {issues && issues.length > 0 && ( diff --git a/sundynix-desktop/frontend/src/studio/TypedNode.tsx b/sundynix-desktop/frontend/src/studio/TypedNode.tsx index 65f55f7..fc8ec0e 100644 --- a/sundynix-desktop/frontend/src/studio/TypedNode.tsx +++ b/sundynix-desktop/frontend/src/studio/TypedNode.tsx @@ -19,11 +19,11 @@ export function TypedNode({ data, selected }: NodeProps) { return (
- +
{k.label} @@ -41,7 +41,7 @@ export function TypedNode({ data, selected }: NodeProps) { ) : ( - + )}
);