1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Check for undeployed change before showing open project dialog

This commit is contained in:
Nick O'Leary 2019-01-18 21:42:13 +00:00
parent 4749c92252
commit 7a6e1fe566
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1601,7 +1601,6 @@ RED.projects = (function() {
sendRequest({
url: "projects/"+name,
type: "PUT",
requireCleanWorkspace: true,
responses: {
200: function(data) {
done(null,data);
@ -2359,7 +2358,15 @@ RED.projects = (function() {
RED.notify(RED._("user.errors.notAuthorized"),"error");
return;
}
if (RED.nodes.dirty()) {
return requireCleanWorkspace(function(cancelled) {
if (!cancelled) {
show('create',{screen:'open'})
}
})
} else {
show('create',{screen:'open'})
}
},
showCredentialsPrompt: function() { //TODO: rename this function
if (!RED.user.hasPermission("projects.write")) {