Browse Source

feat(gui-v2): load team and auth tab

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2791/head
Pranav C 2 years ago
parent
commit
49d308db87
  1. 3
      packages/nc-gui-v2/components/dashboard/TabView.vue
  2. 5
      packages/nc-gui-v2/components/tabs/Auth.vue
  3. 4
      packages/nc-gui-v2/composables/useTabs.ts
  4. 3
      packages/nc-gui-v2/pages/nc/[projectId].vue

3
packages/nc-gui-v2/components/dashboard/TabView.vue

@ -20,7 +20,8 @@ const tableCreateDialog = ref(false)
<v-window v-model="activeTab">
<v-window-item v-for="(tab, i) in tabs" :key="i" :value="i">
<TabsSmartsheet :tab-meta="tab" />
<TabsAuth v-if="tab.type === 'auth'" :tab-meta="tab" />
<TabsSmartsheet v-else :tab-meta="tab" />
</v-window-item>
</v-window>
</div>

5
packages/nc-gui-v2/components/tabs/Auth.vue

@ -0,0 +1,5 @@
<template>
<div>
<h2 class="text-3xl mt-3">Team & Auth</h2>
</div>
</template>

4
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 () => {

3
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(

Loading…
Cancel
Save