From 4f20cd5c0a7c7baf9131d31a2c61456b28e0b85c Mon Sep 17 00:00:00 2001 From: GogoVega <92022724+GogoVega@users.noreply.github.com> Date: Mon, 17 Jun 2024 23:00:06 +0200 Subject: [PATCH] Cleanup and remove old logic when importing identical subflows --- .../@node-red/editor-client/src/js/nodes.js | 333 ++++++++---------- 1 file changed, 151 insertions(+), 182 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index 2e3e29b0c..829ac34ee 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -1386,7 +1386,7 @@ RED.nodes = (function() { var wires = links.filter(function(d) { return d.source === p }); for (var i=0;i !!s); // Import the new subflow - no clashes should occur as we've removed // the old version var result = importNodes(subflowNodes); @@ -1801,6 +1801,30 @@ RED.nodes = (function() { return unknownTypes; } + function emitExistingNodesNotification(existingNodes, importedNodes) { + const errorMessage = RED._("clipboard.importDuplicate", { count: existingNodes.length }); + const maxItemCount = 5; // Max 5 items in the list + const nodeList = $("