From 7bba9e62db39cb2d16978f313ed9a9e4fcc7a1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Sucena=20Lopes?= Date: Fri, 24 Jan 2025 19:14:19 +0000 Subject: [PATCH] fix(picture input): improve error message Co-Authored-By: Rita Lopes <93883163+MRita443@users.noreply.github.com> --- src/lib/components/forms/picture-input.svelte | 2 +- .../_components/layout/notifications/notification-messages.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/forms/picture-input.svelte b/src/lib/components/forms/picture-input.svelte index ccc7a06..c414918 100644 --- a/src/lib/components/forms/picture-input.svelte +++ b/src/lib/components/forms/picture-input.svelte @@ -14,7 +14,7 @@ // ensure the file is an image if (file?.type?.split('/')[0] !== 'image') { - createNotification(notificationMessages.INVALID_IMAGE); + createNotification(notificationMessages.NOT_AN_IMAGE); return; } diff --git a/src/routes/(app)/_components/layout/notifications/notification-messages.ts b/src/routes/(app)/_components/layout/notifications/notification-messages.ts index 0ab3dca..5ced244 100644 --- a/src/routes/(app)/_components/layout/notifications/notification-messages.ts +++ b/src/routes/(app)/_components/layout/notifications/notification-messages.ts @@ -2,5 +2,5 @@ export default Object.freeze<{ [key: string]: string; }>({ COPY_EMAIL: 'O email foi copiado para o teu clipboard :)', - INVALID_IMAGE: 'Imagem inválida! Por favor, seleciona outra.' + NOT_AN_IMAGE: 'O ficheiro não é uma imagem. Por favor, seleciona outro.' });