mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 18:51:37 +10:00
feat: billing
This commit is contained in:
@ -23,7 +23,6 @@ export type OrganisationInviteEmailProps = {
|
||||
baseUrl: string;
|
||||
senderName: string;
|
||||
organisationName: string;
|
||||
teamName?: string;
|
||||
token: string;
|
||||
};
|
||||
|
||||
@ -32,13 +31,12 @@ export const OrganisationInviteEmailTemplate = ({
|
||||
baseUrl = 'https://documenso.com',
|
||||
senderName = 'John Doe',
|
||||
organisationName = 'Organisation Name',
|
||||
teamName = 'Team Name',
|
||||
token = '',
|
||||
}: OrganisationInviteEmailProps) => {
|
||||
const { _ } = useLingui();
|
||||
const branding = useBranding();
|
||||
|
||||
const previewText = msg`Accept invitation to join a team on Documenso`;
|
||||
const previewText = msg`Accept invitation to join an organisation on Documenso`;
|
||||
|
||||
return (
|
||||
<Html>
|
||||
@ -72,15 +70,11 @@ export const OrganisationInviteEmailTemplate = ({
|
||||
</Text>
|
||||
|
||||
<Text className="my-1 text-center text-base">
|
||||
{teamName ? (
|
||||
<Trans>You have been invited to join the following team</Trans>
|
||||
) : (
|
||||
<Trans>You have been invited to join the following organisation</Trans>
|
||||
)}
|
||||
<Trans>You have been invited to join the following organisation</Trans>
|
||||
</Text>
|
||||
|
||||
<div className="mx-auto my-2 w-fit rounded-lg bg-gray-50 px-4 py-2 text-base font-medium text-slate-600">
|
||||
{teamName || organisationName}
|
||||
{organisationName}
|
||||
</div>
|
||||
|
||||
<Text className="my-1 text-center text-base">
|
||||
@ -92,13 +86,13 @@ export const OrganisationInviteEmailTemplate = ({
|
||||
<Section className="mb-6 mt-6 text-center">
|
||||
<Button
|
||||
className="bg-documenso-500 inline-flex items-center justify-center rounded-lg px-6 py-3 text-center text-sm font-medium text-black no-underline"
|
||||
href={`${baseUrl}/team/invite/${token}`}
|
||||
href={`${baseUrl}/organisation/invite/${token}`}
|
||||
>
|
||||
<Trans>Accept</Trans>
|
||||
</Button>
|
||||
<Button
|
||||
className="ml-4 inline-flex items-center justify-center rounded-lg bg-gray-50 px-6 py-3 text-center text-sm font-medium text-slate-600 no-underline"
|
||||
href={`${baseUrl}/team/decline/${token}`}
|
||||
href={`${baseUrl}/organisation/decline/${token}`}
|
||||
>
|
||||
<Trans>Decline</Trans>
|
||||
</Button>
|
||||
|
||||
@ -2,34 +2,32 @@ import { msg } from '@lingui/core/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { formatTeamUrl } from '@documenso/lib/utils/teams';
|
||||
|
||||
import { Body, Container, Head, Hr, Html, Img, Preview, Section, Text } from '../components';
|
||||
import { useBranding } from '../providers/branding';
|
||||
import { TemplateFooter } from '../template-components/template-footer';
|
||||
import TemplateImage from '../template-components/template-image';
|
||||
|
||||
export type TeamJoinEmailProps = {
|
||||
export type OrganisationJoinEmailProps = {
|
||||
assetBaseUrl: string;
|
||||
baseUrl: string;
|
||||
memberName: string;
|
||||
memberEmail: string;
|
||||
teamName: string;
|
||||
teamUrl: string;
|
||||
organisationName: string;
|
||||
organisationUrl: string;
|
||||
};
|
||||
|
||||
export const TeamJoinEmailTemplate = ({
|
||||
export const OrganisationJoinEmailTemplate = ({
|
||||
assetBaseUrl = 'http://localhost:3002',
|
||||
baseUrl = 'https://documenso.com',
|
||||
memberName = 'John Doe',
|
||||
memberEmail = 'johndoe@documenso.com',
|
||||
teamName = 'Team Name',
|
||||
teamUrl = 'demo',
|
||||
}: TeamJoinEmailProps) => {
|
||||
organisationName = 'Organisation Name',
|
||||
organisationUrl = 'demo',
|
||||
}: OrganisationJoinEmailProps) => {
|
||||
const { _ } = useLingui();
|
||||
const branding = useBranding();
|
||||
|
||||
const previewText = msg`A team member has joined a team on Documenso`;
|
||||
const previewText = msg`A member has joined your organisation on Documenso`;
|
||||
|
||||
return (
|
||||
<Html>
|
||||
@ -59,17 +57,11 @@ export const TeamJoinEmailTemplate = ({
|
||||
|
||||
<Section className="p-2 text-slate-500">
|
||||
<Text className="text-center text-lg font-medium text-black">
|
||||
<Trans>
|
||||
{memberName || memberEmail} joined the team {teamName} on Documenso
|
||||
</Trans>
|
||||
</Text>
|
||||
|
||||
<Text className="my-1 text-center text-base">
|
||||
<Trans>{memberEmail} joined the following team</Trans>
|
||||
<Trans>A new member has joined your organisation {organisationName}</Trans>
|
||||
</Text>
|
||||
|
||||
<div className="mx-auto my-2 w-fit rounded-lg bg-gray-50 px-4 py-2 text-base font-medium text-slate-600">
|
||||
{formatTeamUrl(teamUrl, baseUrl)}
|
||||
{memberName || memberEmail}
|
||||
</div>
|
||||
</Section>
|
||||
</Container>
|
||||
@ -85,4 +77,4 @@ export const TeamJoinEmailTemplate = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default TeamJoinEmailTemplate;
|
||||
export default OrganisationJoinEmailTemplate;
|
||||
@ -2,34 +2,32 @@ import { msg } from '@lingui/core/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { formatTeamUrl } from '@documenso/lib/utils/teams';
|
||||
|
||||
import { Body, Container, Head, Hr, Html, Img, Preview, Section, Text } from '../components';
|
||||
import { useBranding } from '../providers/branding';
|
||||
import { TemplateFooter } from '../template-components/template-footer';
|
||||
import TemplateImage from '../template-components/template-image';
|
||||
|
||||
export type TeamLeaveEmailProps = {
|
||||
export type OrganisationLeaveEmailProps = {
|
||||
assetBaseUrl: string;
|
||||
baseUrl: string;
|
||||
memberName: string;
|
||||
memberEmail: string;
|
||||
teamName: string;
|
||||
teamUrl: string;
|
||||
organisationName: string;
|
||||
organisationUrl: string;
|
||||
};
|
||||
|
||||
export const TeamLeaveEmailTemplate = ({
|
||||
export const OrganisationLeaveEmailTemplate = ({
|
||||
assetBaseUrl = 'http://localhost:3002',
|
||||
baseUrl = 'https://documenso.com',
|
||||
memberName = 'John Doe',
|
||||
memberEmail = 'johndoe@documenso.com',
|
||||
teamName = 'Team Name',
|
||||
teamUrl = 'demo',
|
||||
}: TeamLeaveEmailProps) => {
|
||||
organisationName = 'Organisation Name',
|
||||
organisationUrl = 'demo',
|
||||
}: OrganisationLeaveEmailProps) => {
|
||||
const { _ } = useLingui();
|
||||
const branding = useBranding();
|
||||
|
||||
const previewText = msg`A team member has left a team on Documenso`;
|
||||
const previewText = msg`A member has left your organisation on Documenso`;
|
||||
|
||||
return (
|
||||
<Html>
|
||||
@ -59,17 +57,11 @@ export const TeamLeaveEmailTemplate = ({
|
||||
|
||||
<Section className="p-2 text-slate-500">
|
||||
<Text className="text-center text-lg font-medium text-black">
|
||||
<Trans>
|
||||
{memberName || memberEmail} left the team {teamName} on Documenso
|
||||
</Trans>
|
||||
</Text>
|
||||
|
||||
<Text className="my-1 text-center text-base">
|
||||
<Trans>{memberEmail} left the following team</Trans>
|
||||
<Trans>A member has left your organisation {organisationName}</Trans>
|
||||
</Text>
|
||||
|
||||
<div className="mx-auto my-2 w-fit rounded-lg bg-gray-50 px-4 py-2 text-base font-medium text-slate-600">
|
||||
{formatTeamUrl(teamUrl, baseUrl)}
|
||||
{memberName || memberEmail}
|
||||
</div>
|
||||
</Section>
|
||||
</Container>
|
||||
@ -85,4 +77,4 @@ export const TeamLeaveEmailTemplate = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default TeamLeaveEmailTemplate;
|
||||
export default OrganisationLeaveEmailTemplate;
|
||||
Reference in New Issue
Block a user