Skip to content

Commit

Permalink
feat: add limit for temporary to verify email
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Jun 10, 2023
1 parent 886e274 commit 3f6c3b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/shared/i18n/langs/en-US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"k4231ab36": "Performance statistics",
"k42a98418": "File Service",
"k4539164b": "The OTP code is 6 digits",
"k45e2f71f": "Temporary users cannot verify email address, please claim account first",
"k4603baea": "Create Group Panel",
"k47489688": "Group Service",
"k48a38bc1": "Group not found",
Expand Down
1 change: 1 addition & 0 deletions client/shared/i18n/langs/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"k4231ab36": "性能统计",
"k42a98418": "文件服务",
"k4539164b": "校验码为6位",
"k45e2f71f": "临时用户无法认证邮箱, 请先认领账号",
"k4603baea": "创建群组面板",
"k47489688": "群组服务",
"k48a38bc1": "群组不存在",
Expand Down
9 changes: 8 additions & 1 deletion client/web/src/components/modals/SettingsView/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { closeModal, pluginUserExtraInfo } from '@/plugin/common';
import { getGlobalSocket } from '@/utils/global-state-helper';
import { setUserJWT } from '@/utils/jwt-helper';
import { setGlobalUserLoginInfo } from '@/utils/user-helper';
import { Button, Divider, Tag, Typography } from 'antd';
import { Button, Divider, message, Tag, Typography } from 'antd';
import React, { useCallback } from 'react';
import { useNavigate } from 'react-router';
import { Avatar } from 'tailchat-design';
Expand Down Expand Up @@ -125,6 +125,13 @@ export const SettingsAccount: React.FC = React.memo(() => {
color="warning"
className="cursor-pointer"
onClick={() => {
if (userInfo.temporary) {
message.warning(
t('临时用户无法认证邮箱, 请先认领账号')
);
return;
}

const key = openModal(
<EmailVerify
onSuccess={() => {
Expand Down

0 comments on commit 3f6c3b0

Please sign in to comment.