diff --git a/src/components/ContactForm.vue b/src/components/ContactForm.vue index 9c3adcb..7cd20ba 100755 --- a/src/components/ContactForm.vue +++ b/src/components/ContactForm.vue @@ -52,10 +52,10 @@ -
+
{{ $t('contact.form.error') }}
-
+
{{ $t('contact.form.success') }}
diff --git a/src/components/GuestBookLogin.vue b/src/components/GuestBookLogin.vue index 253a77b..ccd84d9 100644 --- a/src/components/GuestBookLogin.vue +++ b/src/components/GuestBookLogin.vue @@ -2,7 +2,7 @@

{{ $t('guestbook.signin') }}

{{ $t('guestbook.share') }}

-
+
+
+
+ + +
+
+
+ {{ $t('guestbook.error') }} +
+
+
+
+ {{ $t('guestbook.success') }} +
+
+

{{ $t('guestbook.infos') }}

diff --git a/src/components/GuestbookMessage.vue b/src/components/GuestbookMessage.vue index bd1f1b8..ffe3515 100644 --- a/src/components/GuestbookMessage.vue +++ b/src/components/GuestbookMessage.vue @@ -45,9 +45,11 @@ export default defineComponent({ const formatDateAndTime = computed(() => { const date = new Date(props.date) - const month = date.getMonth().toString().startsWith('0') ? date.getMonth() : `0${date.getMonth()}` - const minutes = date.getMinutes().toString().startsWith('0') ? date.getMinutes() : `0${date.getMinutes()}` - return `${date.getDate()} ${i18n.t(`month.${month}`)} ${date.getFullYear()} at ${date.getHours()}:${minutes}` + const realMonth = date.getMonth()+1 + const month = realMonth.toString().length == 2 ? realMonth.toString() : `0${realMonth.toString()}` + const minutes = date.getMinutes().toString().length == 2 ? date.getMinutes() : `0${date.getMinutes()}` + const hours = date.getHours().toString().length == 2 ? date.getHours() : `0${date.getHours()}` + return `${date.getDate()} ${i18n.t(`month.${month}`)} ${date.getFullYear()} at ${hours}:${minutes}` }) return { diff --git a/src/locales/en-EN.ts b/src/locales/en-EN.ts index c9834ca..9022b1c 100755 --- a/src/locales/en-EN.ts +++ b/src/locales/en-EN.ts @@ -172,8 +172,8 @@ export default { subject: 'Why are you contacting me?', content: 'Tell me about your project', submit: 'Submit', - error: 'Error in the form!', - success: 'Form successfully sent!' + error: 'Error while sending the form ❌', + success: 'Thank you for your message 😉' }, why: { title: 'Why contact me ? 📩', @@ -192,7 +192,11 @@ export default { signin: "Sign the guestbook", share: 'Share a message to future visitors to this site.', login: 'Login', - infos: 'Your information is only used to display your name and reply by email.' + infos: 'Your information is only used to display your name and reply by email.', + placeholder: 'Your message...', + sign: 'Sign', + error: 'Error while sending your message ❌', + success: 'Thank you for your message 😉' }, date: { diff --git a/src/locales/fr-FR.ts b/src/locales/fr-FR.ts index ed7514e..2b73856 100755 --- a/src/locales/fr-FR.ts +++ b/src/locales/fr-FR.ts @@ -172,8 +172,8 @@ export default { subject: 'Pourquoi me contactez-vous ?', content: 'Racontez moi votre projet', submit: 'Envoyer', - error: 'Erreur dans le formulaire !', - success: 'Formulaire envoyé avec succès !' + error: "Erreur lors de l'envoi du formulaire ❌", + success: 'Merci pour votre message 😉' }, why: { title: 'Pourquoi me contacter ? 📩', @@ -192,7 +192,11 @@ export default { signin: "Signer le livre d'or", share: 'Partagez un message aux futurs visiteurs de ce site.', login: 'Connexion', - infos: 'Vos informations ne sont utilisées que pour afficher votre nom et répondre par e-mail.' + infos: 'Vos informations ne sont utilisées que pour afficher votre nom et répondre par e-mail.', + placeholder: 'Votre message...', + sign: 'Signer', + error: "Erreur lors de l'envoi de votre message ❌", + success: 'Merci pour votre message 😉' }, date: { diff --git a/types/types.ts b/types/types.ts index ac0cb8c..a5a99b8 100755 --- a/types/types.ts +++ b/types/types.ts @@ -61,4 +61,8 @@ interface Project { tags: Array, } -export { Form, InfoData, Skill, Experience, Formation, Post, Tag, Project } +interface GuestbookForm { + message: string +} + +export { Form, InfoData, Skill, Experience, Formation, Post, Tag, Project, GuestbookForm }