fix(plugin-workflow): adjust executed alert position (#1381)

This commit is contained in:
Junyi 2023-01-18 00:32:24 +08:00 committed by GitHub
parent d4d8d747b8
commit aaf6718755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 35 deletions

View File

@ -343,6 +343,21 @@ export function NodeDefaultView(props) {
}
},
properties: {
...(workflow.executed ? {
alert: {
'x-component': Alert,
'x-component-props': {
type: 'warning',
showIcon: true,
message: `{{t("Node in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`,
className: css`
width: 100%;
font-size: 85%;
margin-bottom: 2em;
`
},
}
} : {}),
title: {
type: 'string',
name: 'title',
@ -368,25 +383,12 @@ export function NodeDefaultView(props) {
},
properties: instruction.fieldset
},
actions: {
actions: workflow.executed
? null
: {
type: 'void',
'x-component': 'Action.Drawer.Footer',
properties: workflow.executed
? {
alert: {
'x-component': Alert,
'x-component-props': {
type: 'warning',
showIcon: true,
message: `{{t("Node in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`,
className: css`
width: 100%;
font-size: 85%;
`
},
}
}
: {
properties: {
cancel: {
title: '{{t("Cancel")}}',
'x-component': 'Action',

View File

@ -179,27 +179,31 @@ export const TriggerConfig = () => {
}
`
},
properties: fieldset
properties: {
...(executed ? {
alert: {
'x-component': Alert,
'x-component-props': {
type: 'warning',
showIcon: true,
message: `{{t("Trigger in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`,
className: css`
width: 100%;
font-size: 85%;
margin-bottom: 2em;
`
},
}
} : {}),
...fieldset
}
},
actions: {
actions: executed
? null
: {
type: 'void',
'x-component': 'Action.Drawer.Footer',
properties: executed
? {
alert: {
'x-component': Alert,
'x-component-props': {
type: 'warning',
showIcon: true,
message: `{{t("Trigger in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`,
className: css`
width: 100%;
font-size: 85%;
`
},
}
}
: {
properties: {
cancel: {
title: '{{t("Cancel")}}',
'x-component': 'Action',