From cfa2caa1db70f087689c99e7420510a1d080df7e Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Fri, 25 Jul 2025 12:42:51 +0530 Subject: [PATCH] chore: add proper error msg and disable email updation in SH (#5247) Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> --- packages/hoppscotch-common/locales/en.json | 4 +- .../hoppscotch-common/src/pages/profile.vue | 38 ++++-- .../hoppscotch-common/src/platform/auth.ts | 26 +++- .../src/platform/auth.ts | 127 +++++++++++------- .../src/platform/auth/desktop/index.ts | 27 ++-- .../src/platform/auth/web/index.ts | 10 +- 6 files changed, 152 insertions(+), 80 deletions(-) diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json index 4aceec51..7be9ddee 100644 --- a/packages/hoppscotch-common/locales/en.json +++ b/packages/hoppscotch-common/locales/en.json @@ -533,6 +533,7 @@ "delete_account_description": "You must either remove yourself, transfer ownership, or delete these workspaces before you can delete your account.", "delete_activity_log": "Failed to delete activity log", "delete_all_activity_logs": "Failed to delete all activity logs", + "email_already_exists": "This email already exists with a different account. Please set a different email address.", "empty_email_address": "Email Address cannot be empty", "empty_profile_name": "Profile name cannot be empty", "empty_req_name": "Empty Request Name", @@ -856,7 +857,8 @@ "roles_description": "Roles are used to control access to the shared collections.", "updated": "Profile updated", "viewer": "Viewer", - "viewer_description": "Viewers can only view and use requests." + "viewer_description": "Viewers can only view and use requests.", + "verified_email_sent": "A verification email has been sent to your email address. Please refresh the page after verifying your email address. You will receive an email if this email is not associated with any other account." }, "remove": { "star": "Remove star" diff --git a/packages/hoppscotch-common/src/pages/profile.vue b/packages/hoppscotch-common/src/pages/profile.vue index f9f14759..dad65f92 100644 --- a/packages/hoppscotch-common/src/pages/profile.vue +++ b/packages/hoppscotch-common/src/pages/profile.vue @@ -117,9 +117,11 @@ :autofocus="false" styles="flex mt-2 md:max-w-sm" :placeholder="`${t('settings.profile_email')}`" + :disabled="!isEmailEditable" >