fix(plugin-workflow): fix node type title in drawers (#389)
This commit is contained in:
parent
48b2b4bc7b
commit
4476b86b4e
@ -165,14 +165,13 @@ export function NodeDefaultView(props) {
|
|||||||
const { data, children } = props;
|
const { data, children } = props;
|
||||||
const instruction = instructions.get(data.type);
|
const instruction = instructions.get(data.type);
|
||||||
const detailText = workflow.executed ? '{{t("View")}}' : '{{t("Configure")}}';
|
const detailText = workflow.executed ? '{{t("View")}}' : '{{t("Configure")}}';
|
||||||
const typeText = compile(instruction.title);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cx(nodeClass, `workflow-node-type-${data.type}`)}>
|
<div className={cx(nodeClass, `workflow-node-type-${data.type}`)}>
|
||||||
<div className={cx(nodeCardClass)}>
|
<div className={cx(nodeCardClass)}>
|
||||||
<div className={cx(nodeHeaderClass)}>
|
<div className={cx(nodeHeaderClass)}>
|
||||||
<div className={cx(nodeMetaClass)}>
|
<div className={cx(nodeMetaClass)}>
|
||||||
<Tag>{typeText}</Tag>
|
<Tag>{compile(instruction.title)}</Tag>
|
||||||
</div>
|
</div>
|
||||||
<h4 className={cx(nodeTitleClass)}>
|
<h4 className={cx(nodeTitleClass)}>
|
||||||
<strong>{data.title}</strong>
|
<strong>{data.title}</strong>
|
||||||
@ -195,9 +194,9 @@ export function NodeDefaultView(props) {
|
|||||||
type: 'primary',
|
type: 'primary',
|
||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
drawer: {
|
[instruction.type]: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
title: typeText,
|
title: instruction.title,
|
||||||
'x-component': 'Action.Drawer',
|
'x-component': 'Action.Drawer',
|
||||||
'x-decorator': 'Form',
|
'x-decorator': 'Form',
|
||||||
'x-decorator-props': {
|
'x-decorator-props': {
|
||||||
|
Loading…
Reference in New Issue
Block a user