feat(Simulate Node): New node (no-changelog) (#9109)

This commit is contained in:
Michael Kret
2024-05-08 14:02:36 +03:00
committed by GitHub
parent c4bf5b2b92
commit 6b6e8dfc33
15 changed files with 344 additions and 1 deletions

View File

@@ -98,7 +98,7 @@
<NodeIcon
class="node-icon"
:node-type="nodeType"
:node-type="iconNodeType"
:size="40"
:shrink="false"
:color-default="iconColorDefault"
@@ -186,6 +186,8 @@ import {
MANUAL_TRIGGER_NODE_TYPE,
NODE_INSERT_SPACER_BETWEEN_INPUT_GROUPS,
NOT_DUPLICATABE_NODE_TYPES,
SIMULATE_NODE_TYPE,
SIMULATE_TRIGGER_NODE_TYPE,
WAIT_TIME_UNLIMITED,
} from '@/constants';
import { nodeBase } from '@/mixins/nodeBase';
@@ -586,6 +588,25 @@ export default defineComponent({
this.contextMenu.target.value.node.name === this.data?.name
);
},
iconNodeType() {
if (
this.data?.type === SIMULATE_NODE_TYPE ||
this.data?.type === SIMULATE_TRIGGER_NODE_TYPE
) {
const icon = this.data.parameters?.icon as string;
const iconNodeType = this.workflow.expression.getSimpleParameterValue(
this.data,
icon,
'internal',
{},
);
if (iconNodeType && typeof iconNodeType === 'string') {
return this.nodeTypesStore.getNodeType(iconNodeType);
}
}
return this.nodeType;
},
},
watch: {
isActive(newValue, oldValue) {