feat(legal): add legal notice error handling

The legal notice view now shows an error box if the legal notice could
not be loaded.
This commit is contained in:
2026-08-06 23:29:22 +02:00
parent 15b2673643
commit d0a2cce293
5 changed files with 26 additions and 5 deletions
+10 -2
View File
@@ -21,9 +21,14 @@ import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const legalNoticeError = ref(null);
const legalNoticeHtml = ref(null);
onMounted(async () => {
legalNoticeHtml.value = await getLegalNotice();
try {
legalNoticeHtml.value = await getLegalNotice();
} catch {
legalNoticeError.value = 'legal.notice.loadError';
}
});
</script>
@@ -35,7 +40,10 @@ onMounted(async () => {
</h1>
</header>
<main>
<div class="legal-notice" v-html="legalNoticeHtml"></div>
<div class="error" v-if="legalNoticeError">
{{ t(legalNoticeError) }}
</div>
<div class="legal-notice" v-html="legalNoticeHtml" v-else></div>
</main>
</div>
</template>