feat(legal): add legal notice loading indicator

This commit is contained in:
2026-08-05 14:40:43 +02:00
parent 378f19d3b7
commit 8c62b17e5e
+6 -1
View File
@@ -21,11 +21,13 @@ import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const loading = ref(true);
const legalNoticeError = ref(null);
const legalNoticeHtml = ref(null);
onMounted(async () => {
try {
legalNoticeHtml.value = await getLegalNotice();
loading.value = false;
} catch {
legalNoticeError.value = 'legal.notice.loadError';
}
@@ -40,7 +42,10 @@ onMounted(async () => {
</h1>
</header>
<main>
<div class="error" v-if="legalNoticeError">
<div v-if="loading">
{{ t('loading') }}
</div>
<div class="error" v-else-if="legalNoticeError">
{{ t(legalNoticeError) }}
</div>
<div class="legal-notice" v-html="legalNoticeHtml" v-else></div>