mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat(server): display date in yyyy-MM-dd format on email (#10916)
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
"@socket.io/redis-adapter": "^8.3.0",
|
||||
"bullmq": "^5.40.2",
|
||||
"cookie-parser": "^1.4.7",
|
||||
"date-fns": "^4.0.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"eventemitter2": "^6.4.9",
|
||||
"eventsource-parser": "^3.0.0",
|
||||
|
||||
@@ -1403,9 +1403,9 @@ Generated by [AVA](https://avajs.dev).
|
||||
>Test Workspace</span␊
|
||||
>␊
|
||||
team workspace expired on<!-- -->␊
|
||||
<span style="font-weight:600">1/1/2025</span>. All workspace␊
|
||||
data will be permanently deleted on<!-- -->␊
|
||||
<span style="font-weight:600">1/31/2025</span> (180 days after␊
|
||||
<span style="font-weight:600">2025-01-01</span>. All workspace␊
|
||||
data will be permanently deleted on␊
|
||||
<span style="font-weight:600">2025-01-31</span> (180 days after␊
|
||||
expiration). To prevent data loss, please either:␊
|
||||
<li>␊
|
||||
<span␊
|
||||
@@ -1510,8 +1510,8 @@ Generated by [AVA](https://avajs.dev).
|
||||
style="font-weight:600"␊
|
||||
>Test Workspace</span␊
|
||||
>␊
|
||||
team workspace data will be permanently deleted in 24 hours on<!-- -->␊
|
||||
<span style="font-weight:600">1/31/2025</span>. To prevent data␊
|
||||
team workspace data will be permanently deleted in 24 hours on␊
|
||||
<span style="font-weight:600">2025-01-31</span>. To prevent data␊
|
||||
loss, please take immediate action:␊
|
||||
<li>␊
|
||||
<span␊
|
||||
@@ -1775,10 +1775,10 @@ Generated by [AVA](https://avajs.dev).
|
||||
>Test Workspace</span␊
|
||||
>␊
|
||||
team workspace will expire on<!-- -->␊
|
||||
<span style="font-weight:600">1/1/2025</span>. After expiration,␊
|
||||
you won't be able to sync or collaborate with team members.␊
|
||||
Please renew your subscription to continue using all team␊
|
||||
features.␊
|
||||
<span style="font-weight:600">2025-01-01</span>. After␊
|
||||
expiration, you won't be able to sync or collaborate with␊
|
||||
team members. Please renew your subscription to continue using␊
|
||||
all team features.␊
|
||||
</p>␊
|
||||
</tr>␊
|
||||
</tbody>␊
|
||||
@@ -1870,7 +1870,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
>Test Workspace</span␊
|
||||
>␊
|
||||
team workspace expired on<!-- -->␊
|
||||
<span style="font-weight:600">1/1/2025</span>. Your workspace␊
|
||||
<span style="font-weight:600">2025-01-01</span>. Your workspace␊
|
||||
can't sync or collaborate with team members. Please renew␊
|
||||
your subscription to restore all team features.␊
|
||||
</p>␊
|
||||
|
||||
Binary file not shown.
11
packages/backend/server/src/mails/components/date.tsx
Normal file
11
packages/backend/server/src/mails/components/date.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { format } from 'date-fns';
|
||||
|
||||
import { Bold } from './template';
|
||||
|
||||
export interface DateProps {
|
||||
value: Date;
|
||||
}
|
||||
|
||||
export const IOSDate = (props: DateProps) => {
|
||||
return <Bold>{format(props.value, 'yyyy-MM-dd')}</Bold>;
|
||||
};
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './date';
|
||||
export * from './template';
|
||||
export * from './user';
|
||||
export * from './workspace';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TEST_WORKSPACE } from '../common';
|
||||
import {
|
||||
Bold,
|
||||
Button,
|
||||
Content,
|
||||
IOSDate,
|
||||
P,
|
||||
Template,
|
||||
Text,
|
||||
@@ -27,10 +27,9 @@ export default function TeamDeleteInOneMonth(props: TeamDeleteInOneMonthProps) {
|
||||
<Content>
|
||||
<P>
|
||||
Your <Workspace {...workspace} /> team workspace expired on{' '}
|
||||
<Bold>{expirationDate.toLocaleDateString()}</Bold>. All workspace data
|
||||
will be permanently deleted on{' '}
|
||||
<Bold>{deletionDate.toLocaleDateString()}</Bold> (180 days after
|
||||
expiration). To prevent data loss, please either:
|
||||
<IOSDate value={expirationDate} />. All workspace data will be
|
||||
permanently deleted on <IOSDate value={deletionDate} /> (180 days
|
||||
after expiration). To prevent data loss, please either:
|
||||
<li>
|
||||
<Text>Renew your subscription to restore team features</Text>
|
||||
</li>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TEST_WORKSPACE } from '../common';
|
||||
import {
|
||||
Bold,
|
||||
Button,
|
||||
Content,
|
||||
IOSDate,
|
||||
P,
|
||||
Template,
|
||||
Text,
|
||||
@@ -26,9 +26,8 @@ export default function TeamDeleteIn24Hours(props: TeamDeleteIn24HoursProps) {
|
||||
<Content>
|
||||
<P>
|
||||
Your <Workspace {...workspace} /> team workspace data will be
|
||||
permanently deleted in 24 hours on{' '}
|
||||
<Bold>{deletionDate.toLocaleDateString()}</Bold>. To prevent data
|
||||
loss, please take immediate action:
|
||||
permanently deleted in 24 hours on <IOSDate value={deletionDate} />.
|
||||
To prevent data loss, please take immediate action:
|
||||
<li>
|
||||
<Text>Renew your subscription to restore team features</Text>
|
||||
</li>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TEST_WORKSPACE } from '../common';
|
||||
import {
|
||||
Bold,
|
||||
Button,
|
||||
Content,
|
||||
IOSDate,
|
||||
P,
|
||||
Template,
|
||||
Title,
|
||||
@@ -25,9 +25,9 @@ export default function TeamExpireSoon(props: TeamExpireSoonProps) {
|
||||
<Content>
|
||||
<P>
|
||||
Your <Workspace {...workspace} /> team workspace will expire on{' '}
|
||||
<Bold>{expirationDate.toLocaleDateString()}</Bold>. After expiration,
|
||||
you won't be able to sync or collaborate with team members.
|
||||
Please renew your subscription to continue using all team features.
|
||||
<IOSDate value={expirationDate} />. After expiration, you won't
|
||||
be able to sync or collaborate with team members. Please renew your
|
||||
subscription to continue using all team features.
|
||||
</P>
|
||||
<Button href={url}>Go to Billing</Button>
|
||||
</Content>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TEST_WORKSPACE } from '../common';
|
||||
import {
|
||||
Bold,
|
||||
Button,
|
||||
Content,
|
||||
IOSDate,
|
||||
P,
|
||||
Template,
|
||||
Title,
|
||||
@@ -25,9 +25,9 @@ export default function TeamExpired(props: TeamExpiredProps) {
|
||||
<Content>
|
||||
<P>
|
||||
Your <Workspace {...workspace} /> team workspace expired on{' '}
|
||||
<Bold>{expirationDate.toLocaleDateString()}</Bold>. Your workspace
|
||||
can't sync or collaborate with team members. Please renew your
|
||||
subscription to restore all team features.
|
||||
<IOSDate value={expirationDate} />. Your workspace can't sync or
|
||||
collaborate with team members. Please renew your subscription to
|
||||
restore all team features.
|
||||
</P>
|
||||
<Button href={url}>Go to Billing</Button>
|
||||
</Content>
|
||||
|
||||
Reference in New Issue
Block a user