From 4087c372e67f5dfad261ca4111f7e151743689ca Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Mon, 13 Jan 2025 16:16:09 +0100 Subject: [PATCH] feat: empty email refinement --- i18n/en.pot | 7 +++++-- src/layout/FormFields.component.js | 3 +++ src/layout/ModalField.component.js | 2 +- src/layout/VerifyEmailWarning.js | 13 +++++++++---- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 80593ff0..13db6083 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2025-01-13T13:12:31.582Z\n" -"PO-Revision-Date: 2025-01-13T13:12:31.583Z\n" +"POT-Creation-Date: 2025-01-13T15:15:24.364Z\n" +"PO-Revision-Date: 2025-01-13T15:15:24.364Z\n" msgid "Never" msgstr "Never" @@ -431,6 +431,9 @@ msgstr "" "Your email is not verified. Please verify your email to continue using the " "system." +msgid "Please provide an email and verify it to continue using the system." +msgstr "Please provide an email and verify it to continue using the system." + msgid "Manage personal access tokens" msgstr "Manage personal access tokens" diff --git a/src/layout/FormFields.component.js b/src/layout/FormFields.component.js index 10254669..d291b918 100644 --- a/src/layout/FormFields.component.js +++ b/src/layout/FormFields.component.js @@ -406,6 +406,9 @@ class FormFields extends Component { emailUpdated={ this.props?.valueStore?.state?.emailUpdated } + userEmail={ + this.props?.valueStore?.state?.email ?? '' + } /> )} {this.renderFields(this.props.fieldKeys)} diff --git a/src/layout/ModalField.component.js b/src/layout/ModalField.component.js index 39b94c64..88dfb967 100644 --- a/src/layout/ModalField.component.js +++ b/src/layout/ModalField.component.js @@ -165,7 +165,7 @@ export function ModalField({ - {i18n.t( - 'Your email is not verified. Please verify your email to continue using the system.' - )} + {userEmail?.trim() !== '' + ? i18n.t( + 'Your email is not verified. Please verify your email to continue using the system.' + ) + : i18n.t( + 'Please provide an email and verify it to continue using the system.' + )} ) @@ -38,4 +42,5 @@ VerifyEmailWarning.propTypes = { }), }).isRequired, emailUpdated: PropTypes.bool, + userEmail: PropTypes.string, }