Skip to content

Commit

Permalink
feat: flow template add label 、 description (#1985)
Browse files Browse the repository at this point in the history
# Description

Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration

# Snapshots:

Include snapshots for easier review.

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have already rebased the commits and make the commit message
conform to the project standard.
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] Any dependent changes have been merged and published in downstream
modules
  • Loading branch information
Dreammy23 authored Sep 9, 2024
2 parents 2aa791c + bc717c4 commit cadc59b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ export const FlowTemplateModal: React.FC<Props> = ({ isFlowTemplateModalOpen, se
dataIndex: 'name',
key: 'name',
},
{
title: t('Template_Label'),
dataIndex: 'label',
key: 'label',
},
{
title: t('Template_Description'),
dataIndex: 'description',
key: 'description',
},
{
title: t('Template_Action'),
key: 'action',
Expand Down Expand Up @@ -65,13 +75,14 @@ export const FlowTemplateModal: React.FC<Props> = ({ isFlowTemplateModalOpen, se
return (
<>
<Modal
className='w-[700px]'
title={t('Import_From_Template')}
open={isFlowTemplateModalOpen}
onCancel={() => setIsFlowTemplateModalOpen(false)}
cancelButtonProps={{ className: 'hidden' }}
okButtonProps={{ className: 'hidden' }}
>
<Table dataSource={dataSource} columns={columns} />;
<Table className='w-full' dataSource={dataSource} columns={columns} />;
</Modal>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion web/components/flow/canvas-modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from './add-flow-variable-modal';
export * from './export-flow-modal';
export * from './import-flow-modal';
export * from './save-flow-modal';
export * from './template-flow-modal';
export * from './flow-template-modal';
2 changes: 2 additions & 0 deletions web/locales/en/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const FlowEn = {
Higher_Order_Nodes: 'Higher Order',
All_Nodes: 'All',
Import_From_Template: 'Import from template',
Template_Description: 'Description',
Template_Name: 'Template Name',
Template_Label: 'Label',
Template_Action: 'Action',
};
4 changes: 3 additions & 1 deletion web/locales/zh/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const FlowZn = {
Add_Parameter: '添加参数',
Higher_Order_Nodes: '高阶',
All_Nodes: '所有',
Import_Template: '从模版导入',
Import_From_Template: '导入模版',
Template_Description: '描述',
Template_Name: '模版名称',
Template_Label: '标签',
Template_Action: '操作',
};

0 comments on commit cadc59b

Please sign in to comment.