mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add Project Settings menu option
This commit is contained in:
parent
e6d32aab7b
commit
9f7dd7f5d4
@ -67,6 +67,7 @@
|
||||
if (!activeProject) {
|
||||
// Projects enabled but no active project
|
||||
RED.menu.setDisabled('menu-item-projects-open',true);
|
||||
RED.menu.setDisabled('menu-item-projects-settings',true);
|
||||
if (activeProject === false) {
|
||||
// User previously decline the migration to projects.
|
||||
} else { // null/undefined
|
||||
@ -320,8 +321,9 @@
|
||||
var menuOptions = [];
|
||||
if (RED.settings.theme("projects.enabled",false)) {
|
||||
menuOptions.push({id:"menu-item-projects-menu",label:"Projects",options:[
|
||||
{id:"menu-item-projects-new",label:"New...",disabled:false,onselect:"core:new-project"},
|
||||
{id:"menu-item-projects-open",label:"Open...",disabled:false,onselect:"core:open-project"}
|
||||
{id:"menu-item-projects-new",label:"New",disabled:false,onselect:"core:new-project"},
|
||||
{id:"menu-item-projects-open",label:"Open",disabled:false,onselect:"core:open-project"},
|
||||
{id:"menu-item-projects-settings",label:"Project Settings",disabled:false,onselect:"core:show-project-settings"}
|
||||
]});
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ RED.projects.settings = (function() {
|
||||
var tabContainer;
|
||||
|
||||
var trayOptions = {
|
||||
title: "Project Information",// RED._("menu.label.userSettings"),, // TODO: nls
|
||||
title: "Project Settings",// RED._("menu.label.userSettings"),, // TODO: nls
|
||||
buttons: [
|
||||
{
|
||||
id: "node-dialog-ok",
|
||||
|
@ -546,6 +546,7 @@ RED.projects = (function() {
|
||||
} else {
|
||||
show('create-success');
|
||||
RED.menu.setDisabled('menu-item-projects-open',false);
|
||||
RED.menu.setDisabled('menu-item-projects-settings',false);
|
||||
}
|
||||
},
|
||||
400: {
|
||||
@ -1795,7 +1796,7 @@ RED.projects = (function() {
|
||||
|
||||
RED.actions.add("core:new-project",RED.projects.newProject);
|
||||
RED.actions.add("core:open-project",RED.projects.selectProject);
|
||||
|
||||
RED.actions.add("core:show-project-settings",RED.projects.settings.show);
|
||||
var projectsAPI = {
|
||||
sendRequest:sendRequest,
|
||||
createBranchList:createBranchList,
|
||||
|
Loading…
Reference in New Issue
Block a user