mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ Make it possible to display notes in flow
This commit is contained in:
parent
adff086ea2
commit
3d330a94d3
|
@ -129,6 +129,10 @@ export default mixins(nodeBase, workflowHelpers).extend({
|
|||
}
|
||||
},
|
||||
nodeSubtitle (): string | undefined {
|
||||
if (this.data.notesInFlow) {
|
||||
return this.data.notes;
|
||||
}
|
||||
|
||||
if (this.nodeType !== null && this.nodeType.subtitle !== undefined) {
|
||||
return this.workflow.getSimpleParameterValue(this.data as INode, this.nodeType.subtitle) as string | undefined;
|
||||
}
|
||||
|
|
|
@ -142,6 +142,7 @@ export default mixins(
|
|||
nodeValues: {
|
||||
color: '#ff0000',
|
||||
alwaysOutputData: false,
|
||||
notesInFlow: false,
|
||||
continueOnFail: false,
|
||||
retryOnFail: false,
|
||||
maxTries: 3,
|
||||
|
@ -162,6 +163,14 @@ export default mixins(
|
|||
noDataExpression: true,
|
||||
description: 'Notes to save with the node.',
|
||||
},
|
||||
{
|
||||
displayName: 'Notes In Flow',
|
||||
name: 'notesInFlow',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
noDataExpression: true,
|
||||
description: 'If activated it will display the above notes in the flow as subtitle.',
|
||||
},
|
||||
{
|
||||
displayName: 'Node Color',
|
||||
name: 'color',
|
||||
|
@ -438,6 +447,11 @@ export default mixins(
|
|||
Vue.set(this.nodeValues, 'continueOnFail', this.node.continueOnFail);
|
||||
}
|
||||
|
||||
if (this.node.notesInFlow) {
|
||||
foundNodeSettings.push('notesInFlow');
|
||||
Vue.set(this.nodeValues, 'notesInFlow', this.node.notesInFlow);
|
||||
}
|
||||
|
||||
if (this.node.retryOnFail) {
|
||||
foundNodeSettings.push('retryOnFail');
|
||||
Vue.set(this.nodeValues, 'retryOnFail', this.node.retryOnFail);
|
||||
|
|
|
@ -289,6 +289,7 @@ export interface INode {
|
|||
type: string;
|
||||
position: [number, number];
|
||||
disabled?: boolean;
|
||||
notesInFlow?: boolean;
|
||||
retryOnFail?: boolean;
|
||||
maxTries?: number;
|
||||
waitBetweenTries?: number;
|
||||
|
|
Loading…
Reference in a new issue