Browse Source

chore/gui-v2-user-management-added-top-level-await-to-project-page-for-loading-data

pull/2854/head
Muhammed Mustafa 2 years ago
parent
commit
c6837ad158
  1. 4
      packages/nc-gui-v2/pages/index/index.vue
  2. 14
      packages/nc-gui-v2/pages/nc/[projectId]/index.vue

4
packages/nc-gui-v2/pages/index/index.vue

@ -15,7 +15,6 @@ import MdiDatabaseOutline from '~icons/mdi/database-outline'
const { $api, $state, $e } = useNuxtApp()
const toast = useToast()
const { loadProject } = useProject()
const filterQuery = ref('')
const loading = ref(true)
@ -122,9 +121,8 @@ $state.sidebarOpen.value = false
v-else
:custom-row="
(record) => ({
onClick: async () => {
onClick: () => {
$e('a:project:open')
await loadProject(record.id)
navigateTo(`/nc/${record.id}`)
},
})

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

@ -10,18 +10,8 @@ if (!route.params.type) {
addTab({ type: 'auth', title: 'Team & Auth' })
}
watch(
() => route.params.projectId,
async (newVal, oldVal) => {
if (newVal !== oldVal) {
clearTabs()
if (newVal) {
await loadProject(newVal as string)
await loadTables()
}
}
},
)
loadProject(route.params.projectId as string)
loadTables()
$state.sidebarOpen.value = true
</script>

Loading…
Cancel
Save