mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
⚡ Use mapGetters to simplify calls
This commit is contained in:
parent
845b5e4d9b
commit
513ddbb383
|
@ -243,6 +243,7 @@ export default mixins(
|
||||||
...mapGetters('ui', [
|
...mapGetters('ui', [
|
||||||
'sidebarMenuCollapsed',
|
'sidebarMenuCollapsed',
|
||||||
]),
|
]),
|
||||||
|
...mapGetters(['nativelyNumberSuffixedDefaults']),
|
||||||
activeNode (): INodeUi | null {
|
activeNode (): INodeUi | null {
|
||||||
return this.$store.getters.activeNode;
|
return this.$store.getters.activeNode;
|
||||||
},
|
},
|
||||||
|
@ -1183,7 +1184,7 @@ export default mixins(
|
||||||
newNodeData.name = CanvasHelpers.getUniqueNodeName({
|
newNodeData.name = CanvasHelpers.getUniqueNodeName({
|
||||||
nodes: this.$store.getters.allNodes,
|
nodes: this.$store.getters.allNodes,
|
||||||
originalName: newNodeData.name,
|
originalName: newNodeData.name,
|
||||||
nativelyNumberSuffixed: this.$store.getters.nativelyNumberSuffixedDefaults,
|
nativelyNumberSuffixed: this.nativelyNumberSuffixedDefaults,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (nodeTypeData.webhooks && nodeTypeData.webhooks.length) {
|
if (nodeTypeData.webhooks && nodeTypeData.webhooks.length) {
|
||||||
|
@ -1760,7 +1761,7 @@ export default mixins(
|
||||||
newNodeData.name = CanvasHelpers.getUniqueNodeName({
|
newNodeData.name = CanvasHelpers.getUniqueNodeName({
|
||||||
nodes: this.$store.getters.allNodes,
|
nodes: this.$store.getters.allNodes,
|
||||||
originalName: newNodeData.name,
|
originalName: newNodeData.name,
|
||||||
nativelyNumberSuffixed: this.$store.getters.nativelyNumberSuffixedDefaults,
|
nativelyNumberSuffixed: this.nativelyNumberSuffixedDefaults,
|
||||||
});
|
});
|
||||||
|
|
||||||
newNodeData.position = CanvasHelpers.getNewNodePosition(
|
newNodeData.position = CanvasHelpers.getNewNodePosition(
|
||||||
|
@ -2004,7 +2005,7 @@ export default mixins(
|
||||||
newName = CanvasHelpers.getUniqueNodeName({
|
newName = CanvasHelpers.getUniqueNodeName({
|
||||||
nodes: this.$store.getters.allNodes,
|
nodes: this.$store.getters.allNodes,
|
||||||
originalName: newName,
|
originalName: newName,
|
||||||
nativelyNumberSuffixed: this.$store.getters.nativelyNumberSuffixedDefaults,
|
nativelyNumberSuffixed: this.nativelyNumberSuffixedDefaults,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Rename the node and update the connections
|
// Rename the node and update the connections
|
||||||
|
@ -2218,7 +2219,7 @@ export default mixins(
|
||||||
nodes: this.$store.getters.allNodes,
|
nodes: this.$store.getters.allNodes,
|
||||||
originalName: node.name,
|
originalName: node.name,
|
||||||
additionalUsedNames: newNodeNames,
|
additionalUsedNames: newNodeNames,
|
||||||
nativelyNumberSuffixed: this.$store.getters.nativelyNumberSuffixedDefaults,
|
nativelyNumberSuffixed: this.nativelyNumberSuffixedDefaults,
|
||||||
});
|
});
|
||||||
|
|
||||||
newNodeNames.push(newName);
|
newNodeNames.push(newName);
|
||||||
|
|
Loading…
Reference in a new issue