mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix: wrong copywriting in change email modal (#4243)
This commit is contained in:
@@ -32,6 +32,20 @@ const useEmailTitle = (emailType: AuthPanelProps['emailType']) => {
|
|||||||
return t['com.affine.settings.email.action']();
|
return t['com.affine.settings.email.action']();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const useContent = (emailType: AuthPanelProps['emailType'], email: string) => {
|
||||||
|
const t = useAFFiNEI18N();
|
||||||
|
|
||||||
|
switch (emailType) {
|
||||||
|
case 'setPassword':
|
||||||
|
return t['com.affine.auth.set.password.message']();
|
||||||
|
case 'changePassword':
|
||||||
|
return t['com.affine.auth.set.password.message']();
|
||||||
|
case 'changeEmail':
|
||||||
|
return t['com.affine.auth.change.email.message']({
|
||||||
|
email,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const useNotificationHint = (emailType: AuthPanelProps['emailType']) => {
|
const useNotificationHint = (emailType: AuthPanelProps['emailType']) => {
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
@@ -129,6 +143,7 @@ export const SendEmail = ({
|
|||||||
|
|
||||||
const title = useEmailTitle(emailType);
|
const title = useEmailTitle(emailType);
|
||||||
const hint = useNotificationHint(emailType);
|
const hint = useNotificationHint(emailType);
|
||||||
|
const content = useContent(emailType, email);
|
||||||
const buttonContent = useButtonContent(emailType);
|
const buttonContent = useButtonContent(emailType);
|
||||||
const { loading, sendEmail } = useSendEmail(emailType);
|
const { loading, sendEmail } = useSendEmail(emailType);
|
||||||
|
|
||||||
@@ -151,7 +166,7 @@ export const SendEmail = ({
|
|||||||
title={t['com.affine.brand.affineCloud']()}
|
title={t['com.affine.brand.affineCloud']()}
|
||||||
subTitle={title}
|
subTitle={title}
|
||||||
/>
|
/>
|
||||||
<AuthContent>{t['com.affine.auth.reset.password.message']()}</AuthContent>
|
<AuthContent>{content}</AuthContent>
|
||||||
|
|
||||||
<Wrapper
|
<Wrapper
|
||||||
marginTop={30}
|
marginTop={30}
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
"com.affine.auth.set.email.save": "Save Email",
|
"com.affine.auth.set.email.save": "Save Email",
|
||||||
"com.affine.auth.set.password": "Set password",
|
"com.affine.auth.set.password": "Set password",
|
||||||
"com.affine.auth.set.password.message": "Please set a password of 8-20 characters with both letters and numbers to continue signing up with ",
|
"com.affine.auth.set.password.message": "Please set a password of 8-20 characters with both letters and numbers to continue signing up with ",
|
||||||
|
"com.affine.auth.change.email.message": "Your current email is {{email}}. We’ll send a temporary verification link to this email.",
|
||||||
"com.affine.auth.set.password.page.success": "Password set successful",
|
"com.affine.auth.set.password.page.success": "Password set successful",
|
||||||
"com.affine.auth.set.password.page.title": "Set your AFFiNE Cloud password",
|
"com.affine.auth.set.password.page.title": "Set your AFFiNE Cloud password",
|
||||||
"com.affine.auth.set.password.placeholder": "Set a password at least 8 letters long",
|
"com.affine.auth.set.password.placeholder": "Set a password at least 8 letters long",
|
||||||
|
|||||||
Reference in New Issue
Block a user