diff --git a/web/app/dashboard/ai-workflows/_components/flowgram-editor-provider.tsx b/web/app/dashboard/ai-workflows/_components/flowgram-editor-provider.tsx index e0d3403..eb467d9 100644 --- a/web/app/dashboard/ai-workflows/_components/flowgram-editor-provider.tsx +++ b/web/app/dashboard/ai-workflows/_components/flowgram-editor-provider.tsx @@ -86,31 +86,8 @@ export function useFlowgramEditorProps({ plugins: () => [ createMinimapPlugin({ disableLayer: true, - canvasStyle: { - canvasWidth: 150, - canvasHeight: 84, - canvasPadding: 48, - canvasBackground: "rgba(245, 245, 245, 1)", - canvasBorderRadius: 8, - viewportBackground: "rgba(235, 235, 235, 1)", - viewportBorderRadius: 4, - viewportBorderColor: "rgba(201, 201, 201, 1)", - viewportBorderWidth: 1, - viewportBorderDashLength: 2, - nodeColor: "rgba(255, 255, 255, 1)", - nodeBorderRadius: 2, - nodeBorderWidth: 0.145, - nodeBorderColor: "rgba(6, 7, 9, 0.10)", - overlayColor: "rgba(255, 255, 255, 0)", - }, - }), - createFreeSnapPlugin({ - edgeColor: "#00B2B2", - alignColor: "#00B2B2", - edgeLineWidth: 1, - alignLineWidth: 1, - alignCrossWidth: 8, }), + createFreeSnapPlugin({}), ], } }, diff --git a/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx b/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx index 5d09724..3d704bf 100644 --- a/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx +++ b/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx @@ -70,12 +70,12 @@ function FlowgramNodeForm({
name="title"> {({ field }) => ( -
+
{field.value || fallbackTitle}
)} -
{nodeType}
+
{nodeType}
) } @@ -106,7 +106,7 @@ function ConditionNodeForm({
name="title"> {({ field }) => ( -
+
{field.value || fallbackTitle}
)} @@ -129,16 +129,16 @@ function ConditionNodeForm({ } return ( -
+
{branches.map((branch, index) => (
{ event.stopPropagation() @@ -154,7 +154,7 @@ function ConditionNodeForm({ {branch.name || (branch.default ? "默认分支" : branch.id)} - + {branch.default ? "else" : index === 0 ? "if" : "elseif"} {branch.default ? null : ( diff --git a/web/app/dashboard/ai-workflows/_components/flowgram-node-renderer.tsx b/web/app/dashboard/ai-workflows/_components/flowgram-node-renderer.tsx index e5d6939..ea67ff7 100644 --- a/web/app/dashboard/ai-workflows/_components/flowgram-node-renderer.tsx +++ b/web/app/dashboard/ai-workflows/_components/flowgram-node-renderer.tsx @@ -25,13 +25,13 @@ export function FlowgramNodeRenderer(props: WorkflowNodeProps) { {form?.render()} diff --git a/web/app/dashboard/ai-workflows/_components/workflow-config-sidebar.tsx b/web/app/dashboard/ai-workflows/_components/workflow-config-sidebar.tsx index beec1d4..1616058 100644 --- a/web/app/dashboard/ai-workflows/_components/workflow-config-sidebar.tsx +++ b/web/app/dashboard/ai-workflows/_components/workflow-config-sidebar.tsx @@ -61,7 +61,7 @@ export function WorkflowConfigPanel({ return (
-
+
{selectedBranchItem ? "条件属性" : "属性"}
diff --git a/web/app/dashboard/ai-workflows/_components/workflow-editor-toolbar.tsx b/web/app/dashboard/ai-workflows/_components/workflow-editor-toolbar.tsx index 117c5ac..fdb70d4 100644 --- a/web/app/dashboard/ai-workflows/_components/workflow-editor-toolbar.tsx +++ b/web/app/dashboard/ai-workflows/_components/workflow-editor-toolbar.tsx @@ -69,12 +69,12 @@ export function WorkflowEditorToolbar({ publishDisabled?: boolean }) { return ( -
-
+
+
@@ -84,9 +84,9 @@ export function WorkflowEditorToolbar({ {nodeCount} 个节点 / {edgeCount} 条连线
-
+
{toolbarExtra} -
+
@@ -115,29 +115,29 @@ export function WorkflowEditorToolbar({
- - - - - - - diff --git a/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx b/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx index 61cb74f..d6e324f 100644 --- a/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx +++ b/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx @@ -15,6 +15,7 @@ import { } from "@flowgram.ai/free-layout-editor" import type { AIWorkflowDefinition, AIWorkflowNodeSpec } from "@/lib/api/admin" +import { cn } from "@/lib/utils" import { useFlowgramEditorProps } from "./flowgram-editor-provider" import { @@ -264,11 +265,16 @@ function WorkflowEditorInner({ return (
-
+
-
- -
+ + void }) { return ( -