From 0aa5825d8b85476413b821762d1d98edbb67ff5b Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Mon, 6 Nov 2023 10:56:15 +0530 Subject: [PATCH 1/5] fix: cleanup ui and improve consistency in input elements (#3494) --- .../src/components/collections/index.vue | 9 ++++----- .../src/components/environments/Selector.vue | 2 +- .../hoppscotch-common/src/components/graphql/Sidebar.vue | 2 +- .../hoppscotch-common/src/components/history/index.vue | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/hoppscotch-common/src/components/collections/index.vue b/packages/hoppscotch-common/src/components/collections/index.vue index c19e6dbfe..c903a068f 100644 --- a/packages/hoppscotch-common/src/components/collections/index.vue +++ b/packages/hoppscotch-common/src/components/collections/index.vue @@ -18,13 +18,12 @@ " > - - diff --git a/packages/hoppscotch-common/src/components/environments/Selector.vue b/packages/hoppscotch-common/src/components/environments/Selector.vue index d9dcd1ad0..497076666 100644 --- a/packages/hoppscotch-common/src/components/environments/Selector.vue +++ b/packages/hoppscotch-common/src/components/environments/Selector.vue @@ -66,7 +66,7 @@ />
From 4a154e6569150b43baa71bb31c9f711103e719ec Mon Sep 17 00:00:00 2001 From: Anwarul Islam Date: Mon, 6 Nov 2023 11:55:03 +0600 Subject: [PATCH 2/5] chore: fix spelling mistake on type import (#3487) --- packages/hoppscotch-common/src/components/http/Headers.vue | 4 ++-- packages/hoppscotch-common/src/helpers/actions.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/hoppscotch-common/src/components/http/Headers.vue b/packages/hoppscotch-common/src/components/http/Headers.vue index da9a9561c..30e400b09 100644 --- a/packages/hoppscotch-common/src/components/http/Headers.vue +++ b/packages/hoppscotch-common/src/components/http/Headers.vue @@ -256,7 +256,7 @@ import * as E from "fp-ts/Either" import * as O from "fp-ts/Option" import * as A from "fp-ts/Array" import draggable from "vuedraggable-es" -import { RequestOptionTabs } from "./RequestOptions.vue" +import { RESTOptionTabs } from "./RequestOptions.vue" import { useCodemirror } from "@composables/codemirror" import { commonHeaders } from "~/helpers/headers" import { useI18n } from "@composables/i18n" @@ -295,7 +295,7 @@ const deletionToast = ref<{ goAway: (delay: number) => void } | null>(null) const props = defineProps<{ modelValue: HoppRESTRequest }>() const emit = defineEmits<{ - (e: "change-tab", value: RequestOptionTabs): void + (e: "change-tab", value: RESTOptionTabs): void (e: "update:modelValue", value: HoppRESTRequest): void }>() diff --git a/packages/hoppscotch-common/src/helpers/actions.ts b/packages/hoppscotch-common/src/helpers/actions.ts index d59df7839..2e1923845 100644 --- a/packages/hoppscotch-common/src/helpers/actions.ts +++ b/packages/hoppscotch-common/src/helpers/actions.ts @@ -6,7 +6,7 @@ import { Ref, onBeforeUnmount, onMounted, reactive, watch } from "vue" import { BehaviorSubject } from "rxjs" import { HoppRESTDocument } from "./rest/document" import { HoppGQLRequest, HoppRESTRequest } from "@hoppscotch/data" -import { RequestOptionTabs } from "~/components/http/RequestOptions.vue" +import { RESTOptionTabs } from "~/components/http/RequestOptions.vue" import { HoppGQLSaveContext } from "./graphql/document" import { GQLOptionTabs } from "~/components/graphql/RequestOptions.vue" import { computed } from "vue" @@ -113,7 +113,7 @@ type HoppActionArgsMap = { request: HoppGQLRequest } "request.open-tab": { - tab: RequestOptionTabs | GQLOptionTabs + tab: RESTOptionTabs | GQLOptionTabs } "tab.duplicate-tab": { From 5428a738117b6f14278d1109fdaaf28850c46e27 Mon Sep 17 00:00:00 2001 From: Nicolas Merget <104347736+nmerget@users.noreply.github.com> Date: Mon, 6 Nov 2023 06:55:39 +0100 Subject: [PATCH 3/5] fix: add optional chaining for teamMembers to handle undefined team (#3484) Co-authored-by: James George --- packages/hoppscotch-common/src/components/teams/Edit.vue | 4 ++-- packages/hoppscotch-common/src/components/teams/Invite.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/hoppscotch-common/src/components/teams/Edit.vue b/packages/hoppscotch-common/src/components/teams/Edit.vue index 90fc88656..28129a90b 100644 --- a/packages/hoppscotch-common/src/components/teams/Edit.vue +++ b/packages/hoppscotch-common/src/components/teams/Edit.vue @@ -35,12 +35,12 @@ v-if=" !teamDetails.loading && E.isRight(teamDetails.data) && - teamDetails.data.right.team.teamMembers + teamDetails.data.right.team?.teamMembers " class="border rounded border-divider" >
@@ -122,7 +122,7 @@ From 76af7d5e10952e61a26f475ad3ac48f8e35f4628 Mon Sep 17 00:00:00 2001 From: Balu Babu Date: Mon, 6 Nov 2023 17:25:36 +0530 Subject: [PATCH 4/5] fix: mailer template issue (#3475) --- .../src/admin/admin.service.ts | 2 +- .../src/auth/auth.service.ts | 2 +- .../src/mailer/MailDescriptions.ts | 4 +- .../src/mailer/mailer.service.ts | 2 +- .../src/mailer/templates/team-invitation.hbs | 114 +++++++++--------- ...{code-your-own.hbs => user-invitation.hbs} | 0 6 files changed, 62 insertions(+), 62 deletions(-) rename packages/hoppscotch-backend/src/mailer/templates/{code-your-own.hbs => user-invitation.hbs} (100%) diff --git a/packages/hoppscotch-backend/src/admin/admin.service.ts b/packages/hoppscotch-backend/src/admin/admin.service.ts index 1ac4102ae..98c5d254b 100644 --- a/packages/hoppscotch-backend/src/admin/admin.service.ts +++ b/packages/hoppscotch-backend/src/admin/admin.service.ts @@ -74,7 +74,7 @@ export class AdminService { try { await this.mailerService.sendUserInvitationEmail(inviteeEmail, { - template: 'code-your-own', + template: 'user-invitation', variables: { inviteeEmail: inviteeEmail, magicLink: `${process.env.VITE_BASE_URL}`, diff --git a/packages/hoppscotch-backend/src/auth/auth.service.ts b/packages/hoppscotch-backend/src/auth/auth.service.ts index 63e59ac2a..a794a1da2 100644 --- a/packages/hoppscotch-backend/src/auth/auth.service.ts +++ b/packages/hoppscotch-backend/src/auth/auth.service.ts @@ -229,7 +229,7 @@ export class AuthService { } await this.mailerService.sendEmail(email, { - template: 'code-your-own', + template: 'user-invitation', variables: { inviteeEmail: email, magicLink: `${url}/enter?token=${generatedTokens.token}`, diff --git a/packages/hoppscotch-backend/src/mailer/MailDescriptions.ts b/packages/hoppscotch-backend/src/mailer/MailDescriptions.ts index 864b01c79..6582e531a 100644 --- a/packages/hoppscotch-backend/src/mailer/MailDescriptions.ts +++ b/packages/hoppscotch-backend/src/mailer/MailDescriptions.ts @@ -8,7 +8,7 @@ export type MailDescription = { }; export type UserMagicLinkMailDescription = { - template: 'code-your-own'; + template: 'user-invitation'; variables: { inviteeEmail: string; magicLink: string; @@ -16,7 +16,7 @@ export type UserMagicLinkMailDescription = { }; export type AdminUserInvitationMailDescription = { - template: 'code-your-own'; + template: 'user-invitation'; variables: { inviteeEmail: string; magicLink: string; diff --git a/packages/hoppscotch-backend/src/mailer/mailer.service.ts b/packages/hoppscotch-backend/src/mailer/mailer.service.ts index 8a03d6e57..b61514225 100644 --- a/packages/hoppscotch-backend/src/mailer/mailer.service.ts +++ b/packages/hoppscotch-backend/src/mailer/mailer.service.ts @@ -27,7 +27,7 @@ export class MailerService { case 'team-invitation': return `${mailDesc.variables.invitee} invited you to join ${mailDesc.variables.invite_team_name} in Hoppscotch`; - case 'code-your-own': + case 'user-invitation': return 'Sign in to Hoppscotch'; } } diff --git a/packages/hoppscotch-backend/src/mailer/templates/team-invitation.hbs b/packages/hoppscotch-backend/src/mailer/templates/team-invitation.hbs index b1128a9ae..3618686ef 100644 --- a/packages/hoppscotch-backend/src/mailer/templates/team-invitation.hbs +++ b/packages/hoppscotch-backend/src/mailer/templates/team-invitation.hbs @@ -14,7 +14,7 @@ -->