From 7f501241f0b75fcd0a5bd854c8bcfa2a293e2c8a Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Sun, 3 Oct 2021 15:49:04 +0530 Subject: [PATCH] refactor: remove EAInvite flag --- .../components/collections/ChooseType.vue | 2 +- .../hoppscotch-app/components/teams/Add.vue | 4 +- .../hoppscotch-app/components/teams/index.vue | 7 ++ .../helpers/teams/BackendUserInfo.ts | 6 -- packages/hoppscotch-app/pages/profile.vue | 84 ++++++++----------- 5 files changed, 43 insertions(+), 60 deletions(-) diff --git a/packages/hoppscotch-app/components/collections/ChooseType.vue b/packages/hoppscotch-app/components/collections/ChooseType.vue index 01665ed55..d87bddb70 100644 --- a/packages/hoppscotch-app/components/collections/ChooseType.vue +++ b/packages/hoppscotch-app/components/collections/ChooseType.vue @@ -7,7 +7,7 @@ :selected="true" /> diff --git a/packages/hoppscotch-app/components/teams/Add.vue b/packages/hoppscotch-app/components/teams/Add.vue index c80c37746..9d70e2de8 100644 --- a/packages/hoppscotch-app/components/teams/Add.vue +++ b/packages/hoppscotch-app/components/teams/Add.vue @@ -44,7 +44,7 @@ const { $toast, } = useContext() -const $t = i18n.t.bind(i18n) +const t = i18n.t.bind(i18n) defineProps<{ show: boolean @@ -66,7 +66,7 @@ const addNewTeam = () => (err) => { // err is of type "invalid_name" | GQLError if (err === "invalid_name") { - $toast.error($t("team.name_length_insufficient").toString(), { + $toast.error(t("team.name_length_insufficient").toString(), { icon: "error_outline", }) } else { diff --git a/packages/hoppscotch-app/components/teams/index.vue b/packages/hoppscotch-app/components/teams/index.vue index e379cbba0..104eed298 100644 --- a/packages/hoppscotch-app/components/teams/index.vue +++ b/packages/hoppscotch-app/components/teams/index.vue @@ -36,6 +36,13 @@ @edit-team="editTeam(team, team.id)" /> +
+ help_outline + {{ $t("error.something_went_wrong") }} +
diff --git a/packages/hoppscotch-app/helpers/teams/BackendUserInfo.ts b/packages/hoppscotch-app/helpers/teams/BackendUserInfo.ts index b0e504210..e42fd4705 100644 --- a/packages/hoppscotch-app/helpers/teams/BackendUserInfo.ts +++ b/packages/hoppscotch-app/helpers/teams/BackendUserInfo.ts @@ -28,10 +28,6 @@ export interface UserInfo { * URL to the profile photo of the user (or null if none available) */ photoURL: string | null - /** - * Whether the user has access to Early Access features - */ - eaInvited: boolean } /** @@ -65,7 +61,6 @@ async function updateUserInfo() { displayName email photoURL - eaInvited } } `, @@ -76,7 +71,6 @@ async function updateUserInfo() { displayName: data.me.displayName, email: data.me.email, photoURL: data.me.photoURL, - eaInvited: data.me.eaInvited, }) } catch (e) { currentUserInfo$.next(null) diff --git a/packages/hoppscotch-app/pages/profile.vue b/packages/hoppscotch-app/pages/profile.vue index 88115df9a..424192511 100644 --- a/packages/hoppscotch-app/pages/profile.vue +++ b/packages/hoppscotch-app/pages/profile.vue @@ -47,9 +47,7 @@
{{ $t("settings.sync_collections") }} @@ -57,9 +55,7 @@
{{ $t("settings.sync_environments") }} @@ -67,7 +63,7 @@
{{ $t("settings.sync_history") }} @@ -75,11 +71,7 @@
- + @@ -92,47 +84,37 @@
- + +