diff --git a/ui/src/components/workflow/node/AddNode.tsx b/ui/src/components/workflow/node/AddNode.tsx index 059ad0a2..df3f9d1e 100644 --- a/ui/src/components/workflow/node/AddNode.tsx +++ b/ui/src/components/workflow/node/AddNode.tsx @@ -35,8 +35,6 @@ const AddNode = ({ node, disabled }: AddNodeProps) => { label: t(label as string), icon: icon, onClick: () => { - if (disabled) return; - const nextNode = newNode(type as WorkflowNodeType); addNode(nextNode, node.id); }, diff --git a/ui/src/components/workflow/node/ApplyNode.tsx b/ui/src/components/workflow/node/ApplyNode.tsx index f3f901ee..e8e9c42d 100644 --- a/ui/src/components/workflow/node/ApplyNode.tsx +++ b/ui/src/components/workflow/node/ApplyNode.tsx @@ -71,9 +71,9 @@ const ApplyNode = ({ node, disabled }: ApplyNodeProps) => { return ( <> - setDrawerOpen(true)}> + setDrawerOpen(true)}> {wrappedEl} - + { - const { t } = useTranslation(); - - const { updateNode, removeBranch } = useWorkflowStore(useZustandShallowSelector(["updateNode", "removeBranch"])); - - const handleNodeNameBlur = (e: React.FocusEvent) => { - const oldName = node.name; - const newName = e.target.innerText.trim().substring(0, 64); - if (oldName === newName) { - return; - } - - updateNode( - produce(node, (draft) => { - draft.name = newName; - }) - ); - }; - // TODO: 条件分支 return ( @@ -41,27 +18,13 @@ const ConditionNode = ({ node, disabled, branchId, branchIndex }: ConditionNodeP , - danger: true, - onClick: () => { - if (disabled) return; - - removeBranch(branchId!, branchIndex!); - }, - }, - ], - }} - trigger={["click"]} - > -