connect from connection tab

This commit is contained in:
Jan Prochazka
2022-05-19 09:42:53 +02:00
parent e59eb4b8e6
commit 2f8282cbce
3 changed files with 113 additions and 34 deletions

View File

@@ -183,3 +183,14 @@ export function groupTabs(tabs: any[]) {
return res;
}
export function closeTabWithNoHistory(tabid) {
openedTabs.update(tabs => {
const res = tabs.filter(x => x.tabid != tabid);
const selectedIndex = _.findLastIndex(res, x => x.closedTime == null);
return res.map((x, index) => ({
...x,
selected: index == selectedIndex,
}));
});
}