-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
群组内一键添加好友 || One-click to add friends to the group #251
base: master
Are you sure you want to change the base?
Conversation
👷 Deploy request for tailchat-nightly pending review.Visit the deploys page to approve it
|
修改密码处添加密码验证规则 Add password verification rules |
@@ -45,6 +45,10 @@ const schema = createMetaFormSchema({ | |||
newPassword: metaFormFieldSchema | |||
.string() | |||
.min(6, t('密码不能低于6位')) | |||
.matches(/[A-Z]/, '密码必须包含大写字母') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should wrap with t
which can include translation support
@@ -84,6 +95,12 @@ export const GroupUserPopover: React.FC<{ | |||
<div className="pt-2">{pluginUserExtraInfoEl}</div> | |||
|
|||
<div className="text-right"> | |||
<Tooltip title={t('添加好友')}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think its should also have a permission check like allowSendMessage
because its should can be close if some group dont wanna allow user DM
@@ -41,6 +43,15 @@ export const GroupUserPopover: React.FC<{ | |||
navigate(`/main/personal/converse/${converse._id}`); | |||
}, [navigate]); | |||
|
|||
// 一键添加好友 | |||
const [, handleAddFriend] = useAsyncRequest(async () => { | |||
const { data } = await request.post('/api/friend/request/add', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you should use addFriendRequest
in client/shared/model/friend.ts
群组内一键添加好友
One-click to add friends to the group