mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Flip logic for opt-in to projects
This commit is contained in:
parent
dfebc4b78d
commit
cf40497e6e
@ -145,6 +145,7 @@
|
||||
"active-project": "Active project : __project__",
|
||||
"no-active-project": "No active project : using default flows file",
|
||||
"disabled": "Projects disabled : editorTheme.projects.enabled=false",
|
||||
"disabledNoFlag": "Projects disabled : set editorTheme.projects.enabled=true to enable",
|
||||
"git-not-found": "Projects disabled : git command not found",
|
||||
"git-version-old": "Projects disabled : git __version__ too old"
|
||||
}
|
||||
|
@ -55,9 +55,9 @@ var storageModuleInterface = {
|
||||
return when.reject(e);
|
||||
}
|
||||
if (!!storageModule.projects) {
|
||||
var projectsEnabled = true;
|
||||
var projectsEnabled = false;
|
||||
if (runtime.settings.hasOwnProperty("editorTheme") && runtime.settings.editorTheme.hasOwnProperty("projects")) {
|
||||
projectsEnabled = runtime.settings.editorTheme.projects.enabled !== false;
|
||||
projectsEnabled = runtime.settings.editorTheme.projects.enabled === true;
|
||||
}
|
||||
if (projectsEnabled) {
|
||||
storageModuleInterface.projects = storageModule.projects;
|
||||
|
@ -31,7 +31,7 @@ var settings;
|
||||
var runtime;
|
||||
var log;
|
||||
|
||||
var projectsEnabled = true;
|
||||
var projectsEnabled = false;
|
||||
var projectLogMessages = [];
|
||||
|
||||
var projectsDir;
|
||||
@ -43,12 +43,15 @@ function init(_settings, _runtime) {
|
||||
log = runtime.log;
|
||||
|
||||
try {
|
||||
if (settings.editorTheme.projects.enabled === false) {
|
||||
if (settings.editorTheme.projects.enabled === true) {
|
||||
projectLogMessages.push(log._("storage.localfilesystem.projects.disabled"))
|
||||
projectsEnabled = true;
|
||||
} else if (settings.editorTheme.projects.enabled === false) {
|
||||
projectLogMessages.push(log._("storage.localfilesystem.projects.disabled"))
|
||||
projectsEnabled = false;
|
||||
}
|
||||
} catch(err) {
|
||||
projectsEnabled = true;
|
||||
projectLogMessages.push(log._("storage.localfilesystem.projects.disabledNoFlag"))
|
||||
projectsEnabled = false;
|
||||
}
|
||||
|
||||
if (settings.flowFile) {
|
||||
|
Loading…
Reference in New Issue
Block a user