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) {
|
if (!activeProject) {
|
||||||
// Projects enabled but no active project
|
// Projects enabled but no active project
|
||||||
RED.menu.setDisabled('menu-item-projects-open',true);
|
RED.menu.setDisabled('menu-item-projects-open',true);
|
||||||
|
RED.menu.setDisabled('menu-item-projects-settings',true);
|
||||||
if (activeProject === false) {
|
if (activeProject === false) {
|
||||||
// User previously decline the migration to projects.
|
// User previously decline the migration to projects.
|
||||||
} else { // null/undefined
|
} else { // null/undefined
|
||||||
@ -320,8 +321,9 @@
|
|||||||
var menuOptions = [];
|
var menuOptions = [];
|
||||||
if (RED.settings.theme("projects.enabled",false)) {
|
if (RED.settings.theme("projects.enabled",false)) {
|
||||||
menuOptions.push({id:"menu-item-projects-menu",label:"Projects",options:[
|
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-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-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 tabContainer;
|
||||||
|
|
||||||
var trayOptions = {
|
var trayOptions = {
|
||||||
title: "Project Information",// RED._("menu.label.userSettings"),, // TODO: nls
|
title: "Project Settings",// RED._("menu.label.userSettings"),, // TODO: nls
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
id: "node-dialog-ok",
|
id: "node-dialog-ok",
|
||||||
|
@ -546,6 +546,7 @@ RED.projects = (function() {
|
|||||||
} else {
|
} else {
|
||||||
show('create-success');
|
show('create-success');
|
||||||
RED.menu.setDisabled('menu-item-projects-open',false);
|
RED.menu.setDisabled('menu-item-projects-open',false);
|
||||||
|
RED.menu.setDisabled('menu-item-projects-settings',false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
400: {
|
400: {
|
||||||
@ -1795,7 +1796,7 @@ RED.projects = (function() {
|
|||||||
|
|
||||||
RED.actions.add("core:new-project",RED.projects.newProject);
|
RED.actions.add("core:new-project",RED.projects.newProject);
|
||||||
RED.actions.add("core:open-project",RED.projects.selectProject);
|
RED.actions.add("core:open-project",RED.projects.selectProject);
|
||||||
|
RED.actions.add("core:show-project-settings",RED.projects.settings.show);
|
||||||
var projectsAPI = {
|
var projectsAPI = {
|
||||||
sendRequest:sendRequest,
|
sendRequest:sendRequest,
|
||||||
createBranchList:createBranchList,
|
createBranchList:createBranchList,
|
||||||
|
Loading…
Reference in New Issue
Block a user