From 050c970e7e6568f66e89946faebad8ea2174865f 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 ac86413..7890faf 100644 --- a/front/i18n/Translations.ts +++ b/front/i18n/Translations.ts @@ -182,6 +182,7 @@ export const en = { noRecentSearches: 'No recent searches', avatar: 'Avatar', changeIt: 'Change It', + verified: "Verified", }; export const fr: typeof en = { @@ -366,6 +367,7 @@ export const fr: typeof en = { noRecentSearches: 'Aucune recherche récente', avatar: 'Avatar', changeIt: 'Modifier', + verified: "Verifié", }; export const sp: typeof en = { @@ -555,4 +557,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'),