From ca61efc98698480e4e938295d7a876cb1a58dc86 Mon Sep 17 00:00:00 2001 From: matiseni51 Date: Sat, 1 Feb 2025 11:44:57 +0100 Subject: [PATCH] feat: Add custom label for default deploy button in settings.editorTheme --- .../node_modules/@node-red/editor-client/src/js/ui/deploy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js index ed503bcfe..d77a4dba2 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -44,6 +44,7 @@ RED.deploy = (function() { /** * options: * type: "default" - Button with drop-down options - no further customisation available + * label: the text to display - default: "Deploy" * type: "simple" - Button without dropdown. Customisations: * label: the text to display - default: "Deploy" * icon : the icon to use. Null removes the icon. default: "red/images/deploy-full-o.svg" @@ -51,13 +52,14 @@ RED.deploy = (function() { function init(options) { options = options || {}; var type = options.type || "default"; + var label = options.label || RED._("deploy.deploy"); if (type == "default") { $('
  • '+ ''+ ''+ ' '+ - ''+RED._("deploy.deploy")+''+ + ''+label+''+ ''+ ''+ ''+ @@ -78,7 +80,6 @@ RED.deploy = (function() { mainMenuItems.push({id:"deploymenu-item-reload", icon:"red/images/deploy-reload.svg",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"}) RED.menu.init({id:"red-ui-header-button-deploy-options", options: mainMenuItems }); } else if (type == "simple") { - var label = options.label || RED._("deploy.deploy"); var icon = 'red/images/deploy-full-o.svg'; if (options.hasOwnProperty('icon')) { icon = options.icon;