From 49d308db87127b630d45a994a9a29cd384af7c82 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 21 Jul 2022 15:37:35 +0530 Subject: [PATCH] feat(gui-v2): load team and auth tab Signed-off-by: Pranav C --- packages/nc-gui-v2/components/dashboard/TabView.vue | 3 ++- packages/nc-gui-v2/components/tabs/Auth.vue | 5 +++++ packages/nc-gui-v2/composables/useTabs.ts | 4 ++-- packages/nc-gui-v2/pages/nc/[projectId].vue | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 packages/nc-gui-v2/components/tabs/Auth.vue diff --git a/packages/nc-gui-v2/components/dashboard/TabView.vue b/packages/nc-gui-v2/components/dashboard/TabView.vue index 058e9e6067..02bc289ac9 100644 --- a/packages/nc-gui-v2/components/dashboard/TabView.vue +++ b/packages/nc-gui-v2/components/dashboard/TabView.vue @@ -20,7 +20,8 @@ const tableCreateDialog = ref(false) - + + diff --git a/packages/nc-gui-v2/components/tabs/Auth.vue b/packages/nc-gui-v2/components/tabs/Auth.vue new file mode 100644 index 0000000000..11a17bc2e2 --- /dev/null +++ b/packages/nc-gui-v2/components/tabs/Auth.vue @@ -0,0 +1,5 @@ + diff --git a/packages/nc-gui-v2/composables/useTabs.ts b/packages/nc-gui-v2/composables/useTabs.ts index a248877449..ad9f82e1ee 100644 --- a/packages/nc-gui-v2/composables/useTabs.ts +++ b/packages/nc-gui-v2/composables/useTabs.ts @@ -1,9 +1,9 @@ import { useState } from '#app' export interface TabItem { - type: 'table' | 'view' + type: 'table' | 'view' | 'auth' title: string - id: string + id?: string } export default () => { diff --git a/packages/nc-gui-v2/pages/nc/[projectId].vue b/packages/nc-gui-v2/pages/nc/[projectId].vue index de83fdb7ec..098fd21982 100644 --- a/packages/nc-gui-v2/pages/nc/[projectId].vue +++ b/packages/nc-gui-v2/pages/nc/[projectId].vue @@ -5,11 +5,12 @@ import useTabs from '~/composables/useTabs' const route = useRoute() const { loadProject, loadTables } = useProject() -const { clearTabs } = useTabs() +const { clearTabs, addTab } = useTabs() onMounted(async () => { await loadProject(route.params.projectId as string) await loadTables() + addTab({ type: 'auth', title: 'Team & Auth' }) }) watch(