From 6827e97ec583b2534cdc1c2f33fa44973a0c2bf5 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Fri, 23 Feb 2024 01:05:20 +0530 Subject: [PATCH] refactor: possible links in email templates do not highlight (#3851) --- .../src/mailer/mailer.service.ts | 2 +- .../src/mailer/templates/team-invitation.hbs | 10 +- .../src/mailer/templates/user-invitation.hbs | 120 +++++++++--------- 3 files changed, 72 insertions(+), 60 deletions(-) diff --git a/packages/hoppscotch-backend/src/mailer/mailer.service.ts b/packages/hoppscotch-backend/src/mailer/mailer.service.ts index b61514225..f71d65fe1 100644 --- a/packages/hoppscotch-backend/src/mailer/mailer.service.ts +++ b/packages/hoppscotch-backend/src/mailer/mailer.service.ts @@ -25,7 +25,7 @@ export class MailerService { ): string { switch (mailDesc.template) { case 'team-invitation': - return `${mailDesc.variables.invitee} invited you to join ${mailDesc.variables.invite_team_name} in Hoppscotch`; + return `A user has invited you to join a team workspace in Hoppscotch`; 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 3618686ef..32032b45f 100644 --- a/packages/hoppscotch-backend/src/mailer/templates/team-invitation.hbs +++ b/packages/hoppscotch-backend/src/mailer/templates/team-invitation.hbs @@ -27,6 +27,12 @@ color: #3869D4; } + a.nohighlight { + color: inherit !important; + text-decoration: none !important; + cursor: default !important; + } + a img { border: none; } @@ -458,7 +464,7 @@

Hi there,

-

{{invitee}} with {{invite_team_name}} has invited you to use Hoppscotch to collaborate with them. Click the button below to set up your account and get started:

+

{{invitee}} with {{invite_team_name}} has invited you to use Hoppscotch to collaborate with them. Click the button below to set up your account and get started:

@@ -484,7 +490,7 @@ Welcome aboard,
Your friends at Hoppscotch

-

P.S. If you don't associate with {{invitee}} or {{invite_team_name}}, just ignore this email.

+

P.S. If you don't associate with {{invitee}} or {{invite_team_name}}, just ignore this email.

diff --git a/packages/hoppscotch-backend/src/mailer/templates/user-invitation.hbs b/packages/hoppscotch-backend/src/mailer/templates/user-invitation.hbs index c1a252e82..3505f2eef 100644 --- a/packages/hoppscotch-backend/src/mailer/templates/user-invitation.hbs +++ b/packages/hoppscotch-backend/src/mailer/templates/user-invitation.hbs @@ -14,7 +14,7 @@ -->