Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

Qi138aaed05db5
diff --git a/apps/server/src/modules/auth/mailer/mail.service.ts b/apps/server/src/modules/auth/mailer/mail.service.ts
index 9d3cb4f3e6..6c86afded7 100644
--- a/apps/server/src/modules/auth/mailer/mail.service.ts
+++ b/apps/server/src/modules/auth/mailer/mail.service.ts
@@ -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({
diff --git a/apps/server/src/modules/auth/mailer/template.ts b/apps/server/src/modules/auth/mailer/template.ts
index 3d79c96ade..cfcba00d4a 100644
--- a/apps/server/src/modules/auth/mailer/template.ts
+++ b/apps/server/src/modules/auth/mailer/template.ts
@@ -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%"