mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
Merge pull request #1226 from dbgate/feature/close-tabs
message: close right side tabs #1219
This commit is contained in:
@@ -171,6 +171,10 @@
|
||||
(x, active) => x.tabid != active.tabid && (x.multiTabIndex || 0) == multiTabIndex,
|
||||
tabs => tabs.map(x => (x.selected ? { ...x, tabPreviewMode: false } : x))
|
||||
);
|
||||
const closeRightTabs = multiTabIndex =>
|
||||
closeTabFunc(
|
||||
(x, active) => x.tabid != active.tabid && (x.multiTabIndex || 0) == multiTabIndex && x.tabOrder > active.tabOrder
|
||||
);
|
||||
const reopenClosedTab = () => {
|
||||
const lastClosedTabId = getOpenedTabs()
|
||||
.filter(x => x.closedTime)
|
||||
@@ -445,6 +449,10 @@
|
||||
text: 'Close others',
|
||||
onClick: () => closeOthersInMultiTab(multiTabIndex)(tabid),
|
||||
},
|
||||
{
|
||||
text: 'Close to the right',
|
||||
onClick: () => closeRightTabs(multiTabIndex)(tabid),
|
||||
},
|
||||
{
|
||||
text: 'Duplicate',
|
||||
onClick: () => duplicateTab(tab),
|
||||
|
||||
Reference in New Issue
Block a user