mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add change annotation for newly added flow
This commit is contained in:
parent
363a8b8588
commit
2ddbb44992
@ -602,10 +602,10 @@ RED.deploy = (function() {
|
||||
node.moved = false;
|
||||
}
|
||||
})
|
||||
flowsToLock.forEach(flow => {
|
||||
flow.locked = true
|
||||
})
|
||||
RED.nodes.eachConfig(function (confNode) {
|
||||
if (confNode.z) {
|
||||
ensureUnlocked(confNode.z)
|
||||
}
|
||||
confNode.changed = false;
|
||||
if (confNode.credentials) {
|
||||
delete confNode.credentials;
|
||||
@ -615,8 +615,16 @@ RED.deploy = (function() {
|
||||
subflow.changed = false;
|
||||
});
|
||||
RED.nodes.eachWorkspace(function (ws) {
|
||||
ws.changed = false;
|
||||
if (ws.changed || ws.added) {
|
||||
ensureUnlocked(ws.z)
|
||||
ws.changed = false;
|
||||
delete ws.added
|
||||
RED.events.emit("flows:change", ws)
|
||||
}
|
||||
});
|
||||
flowsToLock.forEach(flow => {
|
||||
flow.locked = true
|
||||
})
|
||||
// Once deployed, cannot undo back to a clean state
|
||||
RED.history.markAllDirty();
|
||||
RED.view.redraw();
|
||||
|
@ -82,8 +82,11 @@ RED.workspaces = (function() {
|
||||
info: "",
|
||||
label: RED._('workspace.defaultName',{number:workspaceIndex}),
|
||||
env: [],
|
||||
hideable: true
|
||||
hideable: true,
|
||||
};
|
||||
if (!skipHistoryEntry) {
|
||||
ws.added = true
|
||||
}
|
||||
RED.nodes.addWorkspace(ws,targetIndex);
|
||||
workspace_tabs.addTab(ws,targetIndex);
|
||||
|
||||
@ -93,8 +96,7 @@ RED.workspaces = (function() {
|
||||
RED.nodes.dirty(true);
|
||||
}
|
||||
}
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
|
||||
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label).toggleClass('red-ui-workspace-changed',!!(ws.contentsChanged || ws.changed || ws.added));
|
||||
RED.view.focus();
|
||||
return ws;
|
||||
}
|
||||
@ -645,7 +647,7 @@ RED.workspaces = (function() {
|
||||
})
|
||||
|
||||
RED.events.on("flows:change", (ws) => {
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).toggleClass('red-ui-workspace-changed',!!(ws.contentsChanged || ws.changed));
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).toggleClass('red-ui-workspace-changed',!!(ws.contentsChanged || ws.changed || ws.added));
|
||||
})
|
||||
|
||||
hideWorkspace();
|
||||
|
Loading…
Reference in New Issue
Block a user