From c326f54f7e068b0750c94481c2c2606cb914bc87 Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Mon, 25 Mar 2024 14:41:25 +0530 Subject: [PATCH] feat: added mutation and function to platform for updating user profile name (#3929) Co-authored-by: amk-dev Co-authored-by: jamesgeorge007 --- packages/hoppscotch-common/locales/en.json | 2 ++ .../src/components/teams/Team.vue | 2 +- .../hoppscotch-common/src/pages/profile.vue | 35 ++++++++++++------- .../hoppscotch-common/src/platform/auth.ts | 7 ++-- .../mutations/UpdateUserDisplayName.graphql | 5 +++ .../src/platform/auth/auth.api.ts | 15 ++++++++ .../src/platform/auth/auth.platform.ts | 20 +++++++++-- 7 files changed, 68 insertions(+), 18 deletions(-) create mode 100644 packages/hoppscotch-selfhost-web/src/api/mutations/UpdateUserDisplayName.graphql diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json index dab2fe94b0..7d3a5757a1 100644 --- a/packages/hoppscotch-common/locales/en.json +++ b/packages/hoppscotch-common/locales/en.json @@ -315,6 +315,7 @@ "danger_zone": "Danger zone", "delete_account": "Your account is currently an owner in these workspaces:", "delete_account_description": "You must either remove yourself, transfer ownership, or delete these workspaces before you can delete your account.", + "empty_profile_name": "Profile name cannot be empty", "empty_req_name": "Empty Request Name", "f12_details": "(F12 for details)", "gql_prettify_invalid_query": "Couldn't prettify an invalid query, solve query syntax errors and try again", @@ -334,6 +335,7 @@ "page_not_found": "This page could not be found", "please_install_extension": "Please install the extension and add origin to the extension.", "proxy_error": "Proxy error", + "same_profile_name": "Updated profile name is same as the current profile name", "script_fail": "Could not execute pre-request script", "something_went_wrong": "Something went wrong", "test_script_fail": "Could not execute post-request script", diff --git a/packages/hoppscotch-common/src/components/teams/Team.vue b/packages/hoppscotch-common/src/components/teams/Team.vue index 76b51bf4e7..eafcd1c0b0 100644 --- a/packages/hoppscotch-common/src/components/teams/Team.vue +++ b/packages/hoppscotch-common/src/components/teams/Team.vue @@ -20,7 +20,7 @@ : '' " > -
+