mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 04:56:00 +00:00
connection workflow
This commit is contained in:
@@ -22,12 +22,14 @@
|
||||
});
|
||||
};
|
||||
|
||||
export const closeMultipleTabs = closeCondition => {
|
||||
export const closeMultipleTabs = (closeCondition, deleteFromHistory = false) => {
|
||||
openedTabs.update(files => {
|
||||
const newFiles = files.map(x => ({
|
||||
...x,
|
||||
closedTime: x.closedTime || (closeCondition(x) ? new Date().getTime() : undefined),
|
||||
}));
|
||||
const newFiles = deleteFromHistory
|
||||
? files.filter(x => !closeCondition(x))
|
||||
: files.map(x => ({
|
||||
...x,
|
||||
closedTime: x.closedTime || (closeCondition(x) ? new Date().getTime() : undefined),
|
||||
}));
|
||||
|
||||
if (newFiles.find(x => x.selected && x.closedTime == null)) {
|
||||
return newFiles;
|
||||
|
||||
Reference in New Issue
Block a user