[WEB-5430] feat: allow users to change email (#8120)

* feat: change user email

* chore: optimised the logic

* feat: add email change functionality and related modals in profile form

* refactor: format checkEmail method for improved readability

* chore: added rate limit exceeded validation

* feat: implement change email modal with localization support

- Added translation support for the change email modal, including titles, descriptions, and error messages.
- Integrated the useTranslation hook for dynamic text rendering.
- Updated form validation messages to utilize localized strings.
- Enhanced user feedback with localized success and error toast messages.
- Updated button labels and placeholders to reflect localization changes.

* chore: added extra validation in cache key

* fix: format files

---------

Co-authored-by: b-saikrishnakanth <bsaikrishnakanth97@gmail.com>
Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Bavisetti Narayan 2025-11-24 21:21:52 +05:30 committed by GitHub
parent d6fce114d6
commit ce6299937f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 2457 additions and 5 deletions

View file

@ -1357,7 +1357,45 @@ export default {
},
},
account_settings: {
profile: {},
profile: {
change_email_modal: {
title: "Change email",
description: "Enter a new email address to receive a verification link.",
toasts: {
success_title: "Success!",
success_message: "Email updated successfully. Please sign in again.",
},
form: {
email: {
label: "New email",
placeholder: "Enter your email",
errors: {
required: "Email is required",
invalid: "Email is invalid",
exists: "Email already exists. Please use a different one.",
validation_failed: "Email validation failed. Please try again.",
},
},
code: {
label: "Unique code",
placeholder: "gets-sets-flys",
helper_text: "Verification code sent to your new email.",
errors: {
required: "Unique code is required",
invalid: "Invalid verification code. Please try again.",
},
},
},
actions: {
continue: "Continue",
confirm: "Confirm",
cancel: "Cancel",
},
states: {
sending: "Sending",
},
},
},
preferences: {
heading: "Preferences",
description: "Customize your app experience the way you work",