共享屏幕添加修改用户名

This commit is contained in:
yj 2024-12-13 13:37:07 +08:00
parent c557fed280
commit 631dbf26b1
2 changed files with 15 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import Avatar from '@/components/Avatar';
import { useEffect, useState, useRef } from "react";
import { storage } from '@/utils';
import EquipmentManagement from '@/components/EquipmentManagement';
import UserName from '@/components/UserName';
const { confirm } = Modal;
const UserListWindow: React.FC = () => {
@ -14,6 +15,7 @@ const UserListWindow: React.FC = () => {
const [user, setUser] = useState<any>({});
const [roomUserList, setRoomUserList] = useState<any>([])
const equipmentManagementRef = useRef<any>();
const userNameRef = useRef<any>();
const channel = new BroadcastChannel('meeting_channel');
const userInfo = JSON.parse(storage.getItem('user') as string)
useEffect(() => {
@ -149,6 +151,18 @@ const UserListWindow: React.FC = () => {
});
}}
></Button>
<Button
type="primary"
className='m-ant-btn'
style={{ width: '100%', marginTop: '10px' }}
size={'small'}
onClick={() => {
userNameRef.current.changeModal({
userName: item.userName,
uid: item.uid
})
}}
></Button>
</div>
}>
<EllipsisOutlined style={{
@ -192,6 +206,7 @@ const UserListWindow: React.FC = () => {
}}></div>
</div>
</div>
<UserName ref={userNameRef} />
<EquipmentManagement ref={equipmentManagementRef} getDriver={(uid: string) => {
channel.postMessage({
type: 'userListWindowEquipmentManagement',

View File

@ -2347,7 +2347,6 @@ const Meeting: React.FC = () => {
{item.uid !== user.uid ? <Button
type="primary"
className='m-ant-btn'
style={{ width: '100%', marginTop: '10px' }}
size={'small'}
onClick={() => {
userNameRef.current.changeModal({