Browse Source

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

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2730/head
Pranav C 2 years ago committed by braks
parent
commit
c5b99a056b
  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 v-model="activeTab">
<v-window-item v-for="(tab, i) in tabs" :key="i" :value="i"> <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-item>
</v-window> </v-window>
</div> </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' import { useState } from '#app'
export interface TabItem { export interface TabItem {
type: 'table' | 'view' type: 'table' | 'view' | 'auth'
title: string title: string
id: string id?: string
} }
export default () => { export default () => {

3
packages/nc-gui-v2/pages/nc/[projectId].vue

@ -5,11 +5,12 @@ import useTabs from '~/composables/useTabs'
const route = useRoute() const route = useRoute()
const { loadProject, loadTables } = useProject() const { loadProject, loadTables } = useProject()
const { clearTabs } = useTabs() const { clearTabs, addTab } = useTabs()
onMounted(async () => { onMounted(async () => {
await loadProject(route.params.projectId as string) await loadProject(route.params.projectId as string)
await loadTables() await loadTables()
addTab({ type: 'auth', title: 'Team & Auth' })
}) })
watch( watch(

Loading…
Cancel
Save