多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
946 B

<script setup lang="ts">
const { loadSetupApps } = useProvideAccountSetupStore()
const $route = useRoute()
onMounted(async () => {
await loadSetupApps()
})
const { categorizeApps } = useAccountSetupStoreOrThrow()
const activeAppId = computed(
() => categorizeApps.value?.[$route.params.nestedPage?.toLowerCase()]?.find((app) => app.title === $route.params.app)?.id,
)
</script>
<template>
<div class="h-full" data-testid="nc-setup">
<template v-if="$route.params.app">
<LazyAccountSetupConfig v-if="activeAppId" :id="activeAppId" />
</template>
<template v-else-if="$route.params.nestedPage?.toLowerCase() === 'storage'">
<LazyAccountSetupList category="Storage" />
</template>
<template v-else-if="$route.params.nestedPage?.toLowerCase() === 'email'">
<LazyAccountSetupList category="Email" />
</template>
<template v-else>
<LazyAccountSetup />
</template>
</div>
</template>