feat: add a reminder for early access in the invitation email (#4097)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Qi 2023-09-02 14:07:49 +08:00 committed by GitHub
parent 3edfc46307
commit 138aaed05d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View File

@ -72,11 +72,15 @@ export class MailService {
invitationInfo.workspace.name
}</span>`;
const subContent =
'Currently, AFFiNE Cloud is in the early access stage. Only Early Access Sponsors can register and log in to AFFiNE Cloud.<a href="https://community.affine.pro/c/insider-general/" style="color: #1e67af" >Please click here for more information.</a>';
const html = emailTemplate({
title: 'You are invited!',
content,
buttonContent: 'Accept & Join',
buttonUrl,
subContent,
});
return this.sendMail({

View File

@ -3,11 +3,13 @@ export const emailTemplate = ({
content,
buttonContent,
buttonUrl,
subContent,
}: {
title: string;
content: string;
buttonContent: string;
buttonUrl: string;
subContent?: string;
}) => {
return `<body style="background: #f6f7fb; overflow: hidden">
<table
@ -58,7 +60,9 @@ export const emailTemplate = ({
>${content}</td>
</tr>
<tr>
<td style="margin-left: 24px; padding-top: 0; padding-bottom: 64px">
<td style="margin-left: 24px; padding-top: 0; padding-bottom: ${
subContent ? '0' : '64px'
}">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="border-radius: 8px" bgcolor="#1E96EB">
@ -85,6 +89,24 @@ export const emailTemplate = ({
</table>
</td>
</tr>
${
subContent
? `<tr>
<td
style="
font-size: 12px;
font-weight: 400;
line-height: 20px;
font-family: inter, Arial, Helvetica, sans-serif;
color: #444;
padding-top: 24px;
"
>
${subContent}
</td>
</tr>`
: ''
}
</table>
<table
width="100%"