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: { 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: { title: {
type: 'string', type: 'string',
name: 'title', name: 'title',
@ -368,25 +383,12 @@ export function NodeDefaultView(props) {
}, },
properties: instruction.fieldset properties: instruction.fieldset
}, },
actions: { actions: workflow.executed
? null
: {
type: 'void', type: 'void',
'x-component': 'Action.Drawer.Footer', 'x-component': 'Action.Drawer.Footer',
properties: workflow.executed properties: {
? {
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%;
`
},
}
}
: {
cancel: { cancel: {
title: '{{t("Cancel")}}', title: '{{t("Cancel")}}',
'x-component': 'Action', 'x-component': 'Action',

View File

@ -179,13 +179,8 @@ export const TriggerConfig = () => {
} }
` `
}, },
properties: fieldset properties: {
}, ...(executed ? {
actions: {
type: 'void',
'x-component': 'Action.Drawer.Footer',
properties: executed
? {
alert: { alert: {
'x-component': Alert, 'x-component': Alert,
'x-component-props': { 'x-component-props': {
@ -195,11 +190,20 @@ export const TriggerConfig = () => {
className: css` className: css`
width: 100%; width: 100%;
font-size: 85%; font-size: 85%;
margin-bottom: 2em;
` `
}, },
} }
} : {}),
...fieldset
} }
},
actions: executed
? null
: { : {
type: 'void',
'x-component': 'Action.Drawer.Footer',
properties: {
cancel: { cancel: {
title: '{{t("Cancel")}}', title: '{{t("Cancel")}}',
'x-component': 'Action', 'x-component': 'Action',