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 { $api, $state, $e } = useNuxtApp()
const toast = useToast() const toast = useToast()
const { loadProject } = useProject()
const filterQuery = ref('') const filterQuery = ref('')
const loading = ref(true) const loading = ref(true)
@ -122,9 +121,8 @@ $state.sidebarOpen.value = false
v-else v-else
:custom-row=" :custom-row="
(record) => ({ (record) => ({
onClick: async () => { onClick: () => {
$e('a:project:open') $e('a:project:open')
await loadProject(record.id)
navigateTo(`/nc/${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' }) addTab({ type: 'auth', title: 'Team & Auth' })
} }
watch( loadProject(route.params.projectId as string)
() => route.params.projectId, loadTables()
async (newVal, oldVal) => {
if (newVal !== oldVal) {
clearTabs()
if (newVal) {
await loadProject(newVal as string)
await loadTables()
}
}
},
)
$state.sidebarOpen.value = true $state.sidebarOpen.value = true
</script> </script>

Loading…
Cancel
Save