mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add core:toggle-tabs action
This commit is contained in:
parent
9dbe531bf7
commit
8108b93c5f
@ -25,7 +25,9 @@
|
||||
"ctrl-alt-o": "core:open-project",
|
||||
"ctrl-g v": "core:show-version-control-tab",
|
||||
"ctrl-shift-l": "core:show-event-log",
|
||||
"ctrl-shift-p":"core:show-action-list"
|
||||
"ctrl-shift-p":"core:show-action-list",
|
||||
"ctrl-h": "core:hide-tab",
|
||||
"ctrl-shift-h": "core:toggle-tabs"
|
||||
},
|
||||
"red-ui-sidebar-node-config": {
|
||||
"backspace": "core:delete-config-selection",
|
||||
|
@ -396,6 +396,18 @@ RED.workspaces = (function() {
|
||||
RED.workspaces.show(id, null, true)
|
||||
})
|
||||
})
|
||||
RED.actions.add("core:toggle-tabs", function() {
|
||||
var currentTabs = workspace_tabs.listTabs();
|
||||
var visibleCount = workspace_tabs.count();
|
||||
currentTabs.forEach(function(id) {
|
||||
if (visibleCount === 0) {
|
||||
RED.workspaces.show(id)
|
||||
} else {
|
||||
RED.workspaces.hide(id)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
RED.actions.add("core:list-flows",function() {
|
||||
RED.actions.invoke("core:search","type:tab ");
|
||||
|
Loading…
Reference in New Issue
Block a user