tabs panel

This commit is contained in:
Jan Prochazka
2021-02-21 11:35:50 +01:00
parent 71bea87a7a
commit 60c1090d6c
9 changed files with 232 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
import uuidv1 from 'uuid/v1';
import { openedTabs } from '../stores';
export default async function openNewTab(newTab, initialData = undefined, options = undefined) {
console.log('OPENING NEW TAB', newTab);
const tabid = uuidv1();
openedTabs.update(tabs => [
...(tabs || []).map(x => ({ ...x, selected: false })),
{
tabid,
selected: true,
...newTab,
},
]);
}