From fcf041024f604c2493420065ef7f717f25ad85a7 Mon Sep 17 00:00:00 2001 From: Qi <474021214@qq.com> Date: Thu, 7 Sep 2023 23:45:31 +0800 Subject: [PATCH] fix: incorrect toast after signed in (#4268) --- .../src/components/affine/auth/sign-in-with-password.tsx | 5 ++--- packages/i18n/src/resources/en.json | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/core/src/components/affine/auth/sign-in-with-password.tsx b/apps/core/src/components/affine/auth/sign-in-with-password.tsx index 2be0a09a2e..776bac8edb 100644 --- a/apps/core/src/components/affine/auth/sign-in-with-password.tsx +++ b/apps/core/src/components/affine/auth/sign-in-with-password.tsx @@ -44,9 +44,8 @@ export const SignInWithPassword: FC = ({ await update(); onSignedIn?.(); pushNotification({ - title: `${email}${t['com.affine.auth.has.signed']()}`, - message: '', - key: Date.now().toString(), + title: t['com.affine.auth.has.signed'](), + message: t['com.affine.auth.has.signed.message'](), type: 'success', }); }, [email, password, pushNotification, onSignedIn, t, update]); diff --git a/packages/i18n/src/resources/en.json b/packages/i18n/src/resources/en.json index 48167aa7b5..4051c37ba5 100644 --- a/packages/i18n/src/resources/en.json +++ b/packages/i18n/src/resources/en.json @@ -73,7 +73,8 @@ "com.affine.auth.desktop.signing.in": "Signing in...", "com.affine.auth.desktop.signing.in.message": "Signing in with account <1>", "com.affine.auth.forget": "Forgot password", - "com.affine.auth.has.signed": " has signed in!", + "com.affine.auth.has.signed": "Signed in", + "com.affine.auth.has.signed.message": "You have been signed in, start to sync your data with AFFiNE Cloud!", "com.affine.auth.later": "Later", "com.affine.auth.open.affine": "Open AFFiNE", "com.affine.auth.open.affine.download-app": "Download App",