@@ -101,7 +205,9 @@ const SharedNodeWrapper = ({ children, node, disabled, onClick }: SharedNodeWrap
>
);
};
+// #endregion
+// #region EditDrawer
type SharedNodeEditDrawerProps = SharedNodeProps & {
children: React.ReactNode;
footer?: boolean;
@@ -174,7 +280,16 @@ const SharedNodeConfigDrawer = ({
setOpen(open)}
destroyOnClose
- loading={loading}
+ extra={
+ } type="text" />}
+ afterDelete={() => {
+ setOpen(false);
+ }}
+ />
+ }
footer={
!!footer && (
@@ -185,7 +300,9 @@ const SharedNodeConfigDrawer = ({
)
}
+ loading={loading}
open={open}
+ title={{node.name}
}
width={640}
onClose={handleClose}
>
@@ -194,8 +311,11 @@ const SharedNodeConfigDrawer = ({
>
);
};
+// #endregion
export default {
- Wrapper: memo(SharedNodeWrapper),
+ Title: memo(SharedNodeTitle),
+ Menu: memo(SharedNodeMenu),
+ Block: memo(SharedNodeBlock),
ConfigDrawer: memo(SharedNodeConfigDrawer),
};
diff --git a/ui/src/i18n/locales/en/nls.workflow.nodes.json b/ui/src/i18n/locales/en/nls.workflow.nodes.json
index 6de94d5d..1a99291e 100644
--- a/ui/src/i18n/locales/en/nls.workflow.nodes.json
+++ b/ui/src/i18n/locales/en/nls.workflow.nodes.json
@@ -1,9 +1,11 @@
{
"workflow_node.action.configure_node": "Configure",
"workflow_node.action.add_node": "Add node",
- "workflow_node.action.delete_node": "Delete node",
+ "workflow_node.action.rename_node": "Rename node",
+ "workflow_node.action.remove_node": "Delete node",
"workflow_node.action.add_branch": "Add branch",
- "workflow_node.action.delete_branch": "Delete branch",
+ "workflow_node.action.rename_branch": "Rename branch",
+ "workflow_node.action.remove_branch": "Delete branch",
"workflow_node.unsaved_changes.confirm": "You have unsaved changes. Do you really want to close the panel and drop those changes?",
diff --git a/ui/src/i18n/locales/zh/nls.workflow.nodes.json b/ui/src/i18n/locales/zh/nls.workflow.nodes.json
index 963c449f..228dcb5c 100644
--- a/ui/src/i18n/locales/zh/nls.workflow.nodes.json
+++ b/ui/src/i18n/locales/zh/nls.workflow.nodes.json
@@ -1,9 +1,11 @@
{
"workflow_node.action.configure_node": "配置节点",
"workflow_node.branch.add_node": "添加节点",
- "workflow_node.action.delete_node": "删除节点",
+ "workflow_node.action.rename_node": "重命名",
+ "workflow_node.action.remove_node": "删除节点",
"workflow_node.action.add_branch": "添加分支",
- "workflow_node.action.delete_branch": "删除分支",
+ "workflow_node.action.rename_branch": "重命名",
+ "workflow_node.action.remove_branch": "删除分支",
"workflow_node.unsaved_changes.confirm": "你有尚未保存的更改。你确定要关闭面板吗?",