mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(server): support selfhost licenses (#8947)
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
TeamDeleteInOneMonth,
|
||||
TeamExpired,
|
||||
TeamExpireSoon,
|
||||
TeamLicense,
|
||||
TeamWorkspaceDeleted,
|
||||
TeamWorkspaceUpgraded,
|
||||
} from './teams';
|
||||
@@ -175,3 +176,8 @@ export const renderTeamWorkspaceExpiredMail = make(
|
||||
TeamExpired,
|
||||
props => `Your ${props.workspace.name} team workspace has expired`
|
||||
);
|
||||
|
||||
export const renderTeamLicenseMail = make(
|
||||
TeamLicense,
|
||||
'Your AFFiNE Self-Hosted Team Workspace license is ready'
|
||||
);
|
||||
|
||||
@@ -23,6 +23,7 @@ export {
|
||||
type TeamExpireSoonProps,
|
||||
} from './expire-soon';
|
||||
export { default as TeamExpired, type TeamExpiredProps } from './expired';
|
||||
export { default as TeamLicense, type TeamLicenseProps } from './license';
|
||||
export {
|
||||
default as TeamWorkspaceUpgraded,
|
||||
type TeamWorkspaceUpgradedProps,
|
||||
|
||||
33
packages/backend/server/src/mails/teams/license.tsx
Normal file
33
packages/backend/server/src/mails/teams/license.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
Bold,
|
||||
Content,
|
||||
OnelineCodeBlock,
|
||||
P,
|
||||
Template,
|
||||
Title,
|
||||
} from '../components';
|
||||
|
||||
export interface TeamLicenseProps {
|
||||
license: string;
|
||||
}
|
||||
|
||||
export default function TeamLicense(props: TeamLicenseProps) {
|
||||
const { license } = props;
|
||||
|
||||
return (
|
||||
<Template>
|
||||
<Title>Here is your license key.</Title>
|
||||
<Content>
|
||||
<OnelineCodeBlock>{license}</OnelineCodeBlock>
|
||||
<P>
|
||||
You can use this key to upgrade your selfhost workspace in{' '}
|
||||
<Bold>Settings > Workspace > License</Bold>.
|
||||
</P>
|
||||
</Content>
|
||||
</Template>
|
||||
);
|
||||
}
|
||||
|
||||
TeamLicense.PreviewProps = {
|
||||
license: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
||||
};
|
||||
Reference in New Issue
Block a user