diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index 9ffde4df0..ccab81cf0 100755 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -55,6 +55,7 @@ "dropFlowHere": "Drop the flow here", "addFlow": "Add flow", "addFlowToRight": "Add flow to the right", + "closeFlow": "Close flow", "hideFlow": "Hide flow", "hideOtherFlows": "Hide other flows", "showAllFlows": "Show all flows (__count__ hidden)", diff --git a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json index 5bd7de5a4..5117e10e1 100644 --- a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json @@ -55,6 +55,7 @@ "dropFlowHere": "ここにフローをドロップしてください", "addFlow": "フローの追加", "addFlowToRight": "右側にフローを追加", + "closeFlow": "フローを閉じる", "hideFlow": "フローを非表示", "hideOtherFlows": "他のフローを非表示", "showAllFlows": "全てのフローを表示", diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js index a8e7ea727..4aa6ac232 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js @@ -829,7 +829,7 @@ RED.tabs = (function() { event.preventDefault(); removeTab(tab.id); }); - RED.popover.tooltip(closeLink,RED._("workspace.hideFlow")); + RED.popover.tooltip(closeLink,RED._("workspace.closeFlow")); } // if (tab.hideable) { // li.addClass("red-ui-tabs-closeable") diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js index f2eb5300f..f3c3c212a 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js @@ -201,7 +201,7 @@ RED.workspaces = (function() { } ) } - const activeIndex = currentTabs.findIndex(id => id === activeWorkspace.id) + const activeIndex = currentTabs.findIndex(id => (activeWorkspace && (id === activeWorkspace.id))); menuItems.push( { label: RED._("workspace.moveToStart"), @@ -274,7 +274,8 @@ RED.workspaces = (function() { } else if (tab.type === 'subflow') { RED.subflow.delete(tab.id) } - } + }, + disabled: (workspaceTabCount === 1) }, { label: RED._("menu.label.export"),