feat(contact): add toast notifications for form feedback

- Add toast notifications for contact form success/error responses
- Add toast notifications for backend errors in AppFooter
- Add accessibility explanation for honeypot field
- Add loading state to contact form submit button
- Add i18n translations for toast messages (en/fr)
- Fix honeypot input missing v-model binding
This commit is contained in:
2026-02-04 15:19:08 +01:00
parent 10e51b5da4
commit 37972aa660
6 changed files with 57 additions and 17 deletions

View File

@@ -27,6 +27,7 @@
import type { NavigationMenuItem } from '@nuxt/ui';
import { version } from '../../package.json';
const toast = useToast();
const { isMobile } = useDevice();
const orientation = computed(() => (isMobile ? 'vertical' : 'horizontal'));
const { getMeta } = useBackend();
@@ -48,4 +49,13 @@ const items = computed<NavigationMenuItem[]>(() => [
to: 'https://rust-lang.org/',
},
]);
watch(error, (value) => {
if (value) {
toast.add({
title: $t('backend.errors.title'),
description: $t(value.message ?? 'backend.errors.unknown'),
color: 'error',
});
}
});
</script>