开发: 添加表情匹配, 添加客群中心页面,修复弹框关闭

This commit is contained in:
zhengw
2023-04-20 17:38:19 +08:00
parent 21c1790dc4
commit 2156976a8c
19 changed files with 1135 additions and 123 deletions

View File

@@ -6,6 +6,8 @@
*/
import React, { useEffect, useState } from 'react';
import { IGroup, IGroupMembers } from './ChatLogsType';
import { AdminSvg, OwnerSvg } from './components/Svgs';
export const groupMembersCount = (data: any[], state: any) => {
let count = 0;
@@ -36,6 +38,72 @@ export const groupMembersCount2 = (data: any[], group_members_type: any, state:
return count;
};
// 群 Drawer 群员
export const groupMembersListItem = (item: IGroupMembers, selectGroup: IGroup) => {
return (
<div
key={item.user_id}
style={{
display: 'inline-flex',
justifyContent: 'flex-start',
alignItems: 'center',
width: 80,
flexDirection: 'column',
verticalAlign: 'top',
marginTop: 12,
}}
>
<div
style={{
position: 'relative',
display: 'flex',
flexShrink: 0,
alignItems: 'center',
justifyContent: 'center',
width: 56,
height: 56,
lineHeight: 1,
background: '#69b1ff',
borderRadius: 4,
}}
>
{item.avatar ? (
<img
style={{
maxWidth: '100%',
maxHeight: '100%',
objectFit: 'cover',
borderRadius: 4,
}}
src={item.avatar}
alt=""
/>
) : item.name ? (
item.name[0]
) : (
''
)}
{item.user_id == selectGroup?.owner ? <OwnerSvg /> : null}
{selectGroup?.adminUserIDs?.includes(item.user_id) ? <AdminSvg /> : null}
</div>
<div
style={{
padding: '0 4px',
whiteSpace: 'nowrap',
minWidth: 0,
textOverflow: 'ellipsis',
overflow: 'hidden',
width: 72,
textAlign: 'center',
}}
title={item.name}
>
{item.name}
</div>
</div>
);
};
/**
* 群管理者:
* @param data