29 lines
831 B
Vue
29 lines
831 B
Vue
<script setup lang="ts">
|
|
import { t } from '@/i18n'
|
|
|
|
import { computed, onMounted } from 'vue'
|
|
import { useSessionStore } from '@/stores/session'
|
|
import DashboardShell from '@/components/DashboardShell.vue'
|
|
import AuthShell from '@/components/AuthShell.vue'
|
|
import ErrorView from '@/components/ErrorView.vue'
|
|
|
|
const session = useSessionStore()
|
|
const resolving = computed(() => session.status === 'idle' || session.status === 'checking')
|
|
|
|
onMounted(() => {
|
|
if (session.status === 'idle') {
|
|
session.check()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<template v-if="resolving" />
|
|
<DashboardShell v-else-if="session.session">
|
|
<ErrorView kind="not-found" :breadcrumb="t('Not found')" />
|
|
</DashboardShell>
|
|
<AuthShell v-else :title="t('Page not found')">
|
|
<ErrorView kind="not-found" :breadcrumb="t('Not found')" />
|
|
</AuthShell>
|
|
</template>
|