From afab03baf8a96e9493a3e06c371ac4ec7ca25356 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 13 Sep 2023 17:30:34 +0200 Subject: [PATCH] Add a button to resend verified mail --- front/i18n/Translations.ts | 3 +++ front/views/settings/SettingsProfileView.tsx | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/front/i18n/Translations.ts b/front/i18n/Translations.ts index 07684ea..16e3a28 100644 --- a/front/i18n/Translations.ts +++ b/front/i18n/Translations.ts @@ -183,6 +183,7 @@ export const en = { noRecentSearches: 'No recent searches', avatar: 'Avatar', changeIt: 'Change It', + verified: "Verified", }; export const fr: typeof en = { @@ -368,6 +369,7 @@ export const fr: typeof en = { noRecentSearches: 'Aucune recherche récente', avatar: 'Avatar', changeIt: 'Modifier', + verified: "Verifié", }; export const sp: typeof en = { @@ -558,4 +560,5 @@ export const sp: typeof en = { avatar: 'Avatar', changeIt: 'Cambialo', + verified: "Verified" }; diff --git a/front/views/settings/SettingsProfileView.tsx b/front/views/settings/SettingsProfileView.tsx index bd4b199..fdf16d5 100644 --- a/front/views/settings/SettingsProfileView.tsx +++ b/front/views/settings/SettingsProfileView.tsx @@ -49,12 +49,22 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => { type: 'text', title: translate('email'), data: { - text: `${user.email} ${user.emailVerified ? "verified" : "not verified"}` || translate('NoAssociatedEmail'), + text: user.email || translate('NoAssociatedEmail'), onPress: () => { navigation.navigate('changeEmail'); }, }, }, + { + type: 'text', + title: translate('verified'), + data: { + text: user.emailVerified ? 'verified' : 'not verified', + onPress: user.emailVerified + ? undefined + : () => API.fetch({ route: '/auth/reverify', method: 'PUT' }), + }, + }, { type: 'text', title: translate('avatar'),