feat(SPA): "<page> · RenewCMS" as pages titles, instead of being stuck on whatever lands on first loading
This commit is contained in:
1 parent
fe254112a2
commit
0632bf53cb
12 files changed
+702
-194
No files matched your search
@@ -1,16 +1,25 @@
|
||||
<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>
|
||||
<DashboardShell v-if="session.session">
|
||||
<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')">
|
||||
|
||||
Reference in new issue
Block a user