优化文字

This commit is contained in:
yj 2024-08-16 17:49:04 +08:00
parent 8b4b91c06b
commit 7fcbbfce56
2 changed files with 10 additions and 10 deletions

View File

@ -122,7 +122,7 @@ const Meeting: React.FC = () => {
const [isShareUser, setIsShareUser] = useState<any>(null)
const [currentLookUserStatus, setCurrentLookUserStatus] = useState<0 | 1 | 2 | 3 | 4>(1)
let userInfo = JSON.parse(storage.getItem('user') as string)
const msgTips = '您不是管理员或主讲人,无法开启此功能!'
const msgTips = '您不是管理员或发言人,无法开启此功能!'
useEffect(() => {
let time = null as any;
setUser(userInfo)
@ -295,7 +295,7 @@ const Meeting: React.FC = () => {
case 'OperCamera':
setAllUserListData('OperCamera', item)
break;
// 主讲人用户信息刷新
// 发言人用户信息刷新
case 'ManagerRefresh':
if (item.user.uid === userInfo.uid) {
await agora.updateChannelMediaOptions(item.user.isRoomManager)
@ -348,21 +348,21 @@ const Meeting: React.FC = () => {
const changeAgoraDevice = () => {
function moveAdminsAndSpeakersToFront(arr: any[]): any[] {
// 创建一个新的数组来存放管理员和主讲
// 创建一个新的数组来存放管理员和发言
const adminsAndSpeakers = [] as any;
// 创建一个新的数组来存放其他用户
const otherUsers = [] as any;
// 遍历原始数组
arr.forEach((item: any) => {
if (item.roleId === '1' || item.isRoomManager) {
// 如果是管理员或主讲人,添加到 adminsAndSpeakers 数组
// 如果是管理员或发言人,添加到 adminsAndSpeakers 数组
adminsAndSpeakers.push(item);
} else {
// 否则,添加到 otherUsers 数组
otherUsers.push(item);
}
});
// 将管理员和主讲人放在数组的最前面
// 将管理员和发言人放在数组的最前面
return [...adminsAndSpeakers, ...otherUsers];
}
setRoomUserList((res: any) => {
@ -998,7 +998,7 @@ const Meeting: React.FC = () => {
})
}
}}
>{item.isRoomManager ? '取消房间主讲人' : '设为房间主讲人'}</Button> : null}
>{item.isRoomManager ? '取消房间发言人' : '设为房间发言人'}</Button> : null}
<Button
type="primary"
className='m-ant-btn'
@ -1129,7 +1129,7 @@ const Meeting: React.FC = () => {
{item.userName}{item.uid === user.uid ? '(我)' : ''}
{item.roleId === '1' || item.isRoomManager ?
<span style={{ color: '#02B188', marginLeft: '4px' }}>
{item.roleId === '1' ? '管理员' : '主讲人'}
{item.roleId === '1' ? '管理员' : '发言人'}
</span>
: null}
</span>
@ -1168,7 +1168,7 @@ const Meeting: React.FC = () => {
})
}
}}
>{item.isRoomManager ? '取消房间主讲人' : '设为房间主讲人'}</Button>
>{item.isRoomManager ? '取消房间发言人' : '设为房间发言人'}</Button>
<Button
type="primary"
className='m-ant-btn'
@ -1369,7 +1369,7 @@ const meetingContentUser = (item: any) => {
<img src={ImageUrl.icon32} alt="" />
</div> : null}
{!item.enableMicr ? <img src={item.enableMicr ? ImageUrl.icon22 : ImageUrl.icon22Active} alt="" /> : ''}
<span>{item.userName}{item.roleId === '1' || item.isRoomManager ? item.roleId === '1' ? '(管理员)' : '(主讲人)' : ''}</span>
<span>{item.userName}{item.roleId === '1' || item.isRoomManager ? item.roleId === '1' ? '(管理员)' : '(发言人)' : ''}</span>
</div>
</div>
</>

View File

@ -131,7 +131,7 @@ export const onSignalr = (callBack: Function) => {
user
})
});
// 主讲人用户信息刷新
// 发言人用户信息刷新
connection.on("ManagerRefresh", (user: any) => {
callBack({
key: 'ManagerRefresh',