From 7e4a06044ae0e7631912e3fca4556bca22100cd3 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Tue, 24 Sep 2019 17:22:36 +0900 Subject: [PATCH] Fix menu hiding function for flow editor --- .../@node-red/editor-client/src/js/red.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js index 715da7784..78f82e507 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/red.js +++ b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -455,8 +455,12 @@ var RED = (function() { null ]}); menuOptions.push(null); - menuOptions.push({id:"menu-item-import",label:RED._("menu.label.import"),onselect:"core:show-import-dialog"}); - menuOptions.push({id:"menu-item-export",label:RED._("menu.label.export"),onselect:"core:show-export-dialog"}); + if (RED.settings.theme("menu.menu-item-import-library", true)) { + menuOptions.push({id: "menu-item-import", label: RED._("menu.label.import"), onselect: "core:show-import-dialog"}); + } + if (RED.settings.theme("menu.menu-item-export-library", true)) { + menuOptions.push({id: "menu-item-export", label: RED._("menu.label.export"), onselect: "core:show-export-dialog"}); + } menuOptions.push(null); menuOptions.push({id:"menu-item-search",label:RED._("menu.label.search"),onselect:"core:search"}); menuOptions.push(null); @@ -479,7 +483,9 @@ var RED = (function() { menuOptions.push({id:"menu-item-user-settings",label:RED._("menu.label.settings"),onselect:"core:show-user-settings"}); menuOptions.push(null); - menuOptions.push({id:"menu-item-keyboard-shortcuts",label:RED._("menu.label.keyboardShortcuts"),onselect:"core:show-help"}); + if (RED.settings.theme("menu.menu-item-keyboard-shortcuts", true)) { + menuOptions.push({id: "menu-item-keyboard-shortcuts", label: RED._("menu.label.keyboardShortcuts"), onselect: "core:show-help"}); + } menuOptions.push({id:"menu-item-help", label: RED.settings.theme("menu.menu-item-help.label",RED._("menu.label.help")), href: RED.settings.theme("menu.menu-item-help.url","http://nodered.org/docs")