mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
[groups] Include group counts in copy/paste notifications
This commit is contained in:
parent
7c91c4ae5a
commit
3e7f58dedd
@ -178,6 +178,8 @@
|
||||
"node_plural": "__count__ nodes",
|
||||
"configNode": "__count__ configuration node",
|
||||
"configNode_plural": "__count__ configuration nodes",
|
||||
"group": "__count__ group",
|
||||
"group_plural": "__count__ groups",
|
||||
"flow": "__count__ flow",
|
||||
"flow_plural": "__count__ flows",
|
||||
"subflow": "__count__ subflow",
|
||||
@ -193,6 +195,9 @@
|
||||
"nodesImported": "Imported:",
|
||||
"nodeCopied": "__count__ node copied",
|
||||
"nodeCopied_plural": "__count__ nodes copied",
|
||||
"groupCopied": "__count__ group copied",
|
||||
"groupCopied_plural": "__count__ groups copied",
|
||||
"groupStyleCopied": "Group style copied",
|
||||
"invalidFlow": "Invalid flow: __message__",
|
||||
"export": {
|
||||
"selected":"selected nodes",
|
||||
|
@ -2073,7 +2073,11 @@ if (DEBUG_EVENTS) { console.warn("clearSelection", mouse_mode); }
|
||||
}
|
||||
}
|
||||
clipboard = JSON.stringify(nns);
|
||||
RED.notify(RED._("clipboard.nodeCopied",{count:nns.length}),{id:"clipboard"});
|
||||
if (nodeCount > 0) {
|
||||
RED.notify(RED._("clipboard.nodeCopied",{count:nodeCount}),{id:"clipboard"});
|
||||
} else if (groupCount > 0) {
|
||||
RED.notify(RED._("clipboard.groupCopied",{count:groupCount}),{id:"clipboard"});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4307,12 +4311,16 @@ if (DEBUG_EVENTS) { console.warn("nodeMouseDown", mouse_mode,d); }
|
||||
newConfigNodeCount++;
|
||||
}
|
||||
})
|
||||
var newGroupCount = new_groups.length;
|
||||
if (new_workspaces.length > 0) {
|
||||
counts.push(RED._("clipboard.flow",{count:new_workspaces.length}));
|
||||
}
|
||||
if (newNodeCount > 0) {
|
||||
counts.push(RED._("clipboard.node",{count:newNodeCount}));
|
||||
}
|
||||
if (newGroupCount > 0) {
|
||||
counts.push(RED._("clipboard.group",{count:newGroupCount}));
|
||||
}
|
||||
if (newConfigNodeCount > 0) {
|
||||
counts.push(RED._("clipboard.configNode",{count:newNodeCount}));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user