fix(plugin-workflow): refine experience (#4195)

This commit is contained in:
Junyi 2024-04-27 20:48:23 +08:00 committed by GitHub
parent fec979e190
commit 5711b1a77b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View File

@ -29,7 +29,7 @@ export function CanvasContent({ entry }) {
{workflow?.executed ? (
<Alert
type="warning"
message={lang('Executed workflow cannot be modified')}
message={lang('Executed workflow cannot be modified. Could be copied to a new version to modify.')}
showIcon
className={css`
margin-bottom: 1em;

View File

@ -64,7 +64,9 @@ export function WorkflowCanvas() {
if (loading) {
return <Spin />;
}
return <Result status="404" title="Not found" />;
return (
<Result status="404" title="Not found" extra={<Button onClick={() => navigate(-1)}>{lang('Go back')}</Button>} />
);
}
const { nodes = [], revisions = [], ...workflow } = data?.data ?? {};

View File

@ -230,6 +230,7 @@ export const TriggerConfig = () => {
onChange={(ev) => setEditingTitle(ev.target.value)}
onBlur={(ev) => onChangeTitle(ev.target.value)}
autoSize
disabled={workflow.executed}
/>
</div>
<TriggerExecution />

View File

@ -35,7 +35,7 @@
"Will be executed in the background as a queued task.": "将作为队列任务在后台执行。",
"For user actions that require immediate feedback. Can not use asynchronous nodes in such mode, and it is not recommended to perform time-consuming operations under synchronous mode.":
"适用于需要即时反馈的用户操作。不能在此模式下使用异步节点,并且不建议在同步模式下执行耗时的操作。",
"Go back": "返回",
"Bind workflows": "绑定工作流",
"Workflow will be triggered before or after submitting succeeded based on workflow type.": "工作流会基于其类型在提交成功之前或之后触发。",
"Workflow will be triggered directly once the button clicked, without data saving. Only supports \"Post-action event\" for now.": "按钮点击后直接触发工作流,但不会保存数据。目前仅支持“操作后事件”。",
@ -183,7 +183,7 @@
"Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.":
"删除一个数据表中的数据。可以使用上游节点里的变量作为过滤条件。所有满足条件的数据都将被删除。",
"Executed workflow cannot be modified": "已经执行过的工作流不能被修改",
"Executed workflow cannot be modified. Could be copied to a new version to modify.": "已经执行过的工作流不能被修改,可通过复制到新版本后再修改。",
"Can not delete": "无法删除",
"The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.":
"该节点的执行结果已被其他节点({{nodes}})引用,删除前请先移除引用。",