From 9868d24ad569e077a678a63be5e81c7e6a16a408 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 28 May 2023 00:29:50 +0800 Subject: [PATCH] feat: jump to login page in invite view useful to switch to guest login way --- client/shared/i18n/langs/en-US/translation.json | 3 ++- client/shared/i18n/langs/zh-CN/translation.json | 3 ++- client/web/src/routes/Invite/JoinBtn.tsx | 12 +++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/shared/i18n/langs/en-US/translation.json b/client/shared/i18n/langs/en-US/translation.json index b8147975..1b801f5b 100644 --- a/client/shared/i18n/langs/en-US/translation.json +++ b/client/shared/i18n/langs/en-US/translation.json @@ -22,7 +22,6 @@ "k1a377364": "Message List Virtualization", "k1a78e6f0": "Expiration", "k1ac0bd00": "30 days", - "k1b38bb5c": "Register Now", "k1b3d8c72": "Group Not Found", "k1bc58056": "Private Message Service", "k1bd56481": "Close independent window", @@ -57,6 +56,7 @@ "k323b5cc7": "Recall", "k3279c602": "Add now", "k32905632": "Unlimited invitation link", + "k32ccc323": "Invitation code has expired", "k335c71bf": "OTP code cannot be empty", "k34b5e3ab": "Send Message", "k34e357ee": "Group Summary", @@ -198,6 +198,7 @@ "k9b0bdb34": "Allow members to view group details", "k9b91079c": "All readed", "k9bb01902": "Show Detail", + "k9d343e46": "Haven't logged in yet, login now", "k9d5a843a": "Mail Service", "k9d80acdf": "Verify email", "k9d901c20": "Meeting room", diff --git a/client/shared/i18n/langs/zh-CN/translation.json b/client/shared/i18n/langs/zh-CN/translation.json index 86696f7c..d92b922a 100644 --- a/client/shared/i18n/langs/zh-CN/translation.json +++ b/client/shared/i18n/langs/zh-CN/translation.json @@ -22,7 +22,6 @@ "k1a377364": "聊天列表虚拟化", "k1a78e6f0": "过期时间", "k1ac0bd00": "30天", - "k1b38bb5c": "立即注册", "k1b3d8c72": "群组未找到", "k1bc58056": "私信服务", "k1bd56481": "关闭独立窗口", @@ -57,6 +56,7 @@ "k323b5cc7": "撤回", "k3279c602": "立即添加", "k32905632": "不限时邀请链接", + "k32ccc323": "邀请码已过期", "k335c71bf": "校验码不能为空", "k34b5e3ab": "发送消息", "k34e357ee": "群组概述", @@ -198,6 +198,7 @@ "k9b0bdb34": "允许成员查看群组详情", "k9b91079c": "所有已读", "k9bb01902": "显示详情", + "k9d343e46": "尚未登录, 立即登录", "k9d5a843a": "邮件服务", "k9d80acdf": "认证邮箱", "k9d901c20": "会议室", diff --git a/client/web/src/routes/Invite/JoinBtn.tsx b/client/web/src/routes/Invite/JoinBtn.tsx index daf63786..a483187a 100644 --- a/client/web/src/routes/Invite/JoinBtn.tsx +++ b/client/web/src/routes/Invite/JoinBtn.tsx @@ -32,10 +32,8 @@ export const JoinBtn: React.FC = React.memo((props) => { }); const [isJoined, setIsJoined] = useState(false); - const handleRegister = useCallback(() => { - navigate( - `/entry/register?redirect=${encodeURIComponent(location.pathname)}` - ); + const handleLogin = useCallback(() => { + navigate(`/entry/login?redirect=${encodeURIComponent(location.pathname)}`); }, []); const { value: invite } = useAsync(() => { @@ -103,7 +101,7 @@ export const JoinBtn: React.FC = React.memo((props) => { if (props.expired && new Date(props.expired).valueOf() < Date.now()) { return ( ); } @@ -119,8 +117,8 @@ export const JoinBtn: React.FC = React.memo((props) => { {t('加入群组')} ) : ( - ); });