-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d6018a
commit cb96048
Showing
10 changed files
with
175 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/backend/server/src/mail-templates/components/footer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export type { EmailTemplateProps } from './common'; | ||
export { EmailTemplate } from './template'; | ||
export { WorkspaceAvatar } from './workspace-avatar'; |
23 changes: 23 additions & 0 deletions
23
packages/backend/server/src/mail-templates/components/workspace-avatar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const WorkspaceAvatar = (props: { workspaceName: string }) => { | ||
return ( | ||
<> | ||
<img | ||
src="cid:workspaceAvatar" | ||
alt="" | ||
width="24px" | ||
height="24px" | ||
style={{ | ||
width: '24px', | ||
height: '24px', | ||
marginLeft: '4px', | ||
borderRadius: '12px', | ||
objectFit: 'cover', | ||
verticalAlign: 'middle', | ||
}} | ||
/> | ||
<span style={{ fontWeight: 500, marginRight: '4px' }}> | ||
{props.workspaceName || 'Unknown Workspace'} | ||
</span> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/backend/server/src/mail-templates/team-workspace-upgraded.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Text } from '@react-email/components'; | ||
|
||
import { EmailTemplate, WorkspaceAvatar } from './components'; | ||
|
||
export type TeamWorkspaceUpgradedProps = { | ||
workspaceName: string; | ||
isOwner: boolean; | ||
url?: string; | ||
}; | ||
|
||
const MailContent = (props: TeamWorkspaceUpgradedProps) => { | ||
const { isOwner, workspaceName } = props; | ||
return ( | ||
<Text> | ||
{isOwner ? ( | ||
<> | ||
<WorkspaceAvatar workspaceName={workspaceName} /> | ||
has been upgraded to team workspace with the following benefits: | ||
</> | ||
) : ( | ||
<> | ||
Great news! <WorkspaceAvatar workspaceName={workspaceName} /> has been | ||
upgraded to team workspace by the workspace owner. | ||
<br /> | ||
You now have access to the following enhanced features: | ||
</> | ||
)} | ||
<br /> ✓ 100 GB initial storage + 20 GB per seat | ||
<br /> ✓ 500 MB of maximum file size | ||
<br /> ✓ Unlimited team members (10+ seats) | ||
<br /> ✓ Multiple admin roles | ||
<br /> ✓ Priority customer support | ||
</Text> | ||
); | ||
}; | ||
|
||
export default function TeamWorkspaceUpgraded( | ||
props: TeamWorkspaceUpgradedProps | ||
) { | ||
return ( | ||
<EmailTemplate | ||
title="Welcome to the team workspace!" | ||
content={<MailContent {...props} />} | ||
buttonContent="Open Workspace" | ||
buttonUrl={props.url || 'https://app.affine.pro'} | ||
/> | ||
); | ||
} |