Skip to content

Commit 3bdc438

Browse files
jasperdaiAbySwifter
authored andcommitted
【Electron】update Electron TUIRoomKit
1 parent e26a88a commit 3bdc438

File tree

73 files changed

+684
-523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+684
-523
lines changed

Electron/vue2/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 2024.04.29@2.3.1
2+
3+
**Feature**
4+
5+
- 升级 [@tencentcloud/tuiroom-engine-electron](https://www.npmjs.com/package/@tencentcloud/tuiroom-engine-electron) 到 v2.3.1 版本,详情请查看 [发布日志](https://cloud.tencent.com/document/product/1690/89361)
6+
7+
**Bug Fixed**
8+
- 修复 Electron 下拔出外接摄像头摄像头列表默认设备未更新的问题;
9+
- 修复成员操作面板距顶部距离不够,展示不完全问题;
10+
- 修复 Notification 组件收到其他成员处理事件时显隐展示的问题;
11+
- 修复获取主持人和管理员身份后没有更新申请上麦列表的问题;
12+
- 修复聊天消息未读数不准确的问题;
13+
- 修复 MessageBox 组件进房后点击按钮无法关闭的问题;
14+
- 修复转交房主或管理员状态下多次点击麦克风和摄像头按钮 disable 状态错误的问题。
15+
116
## 2024.04.08@2.2.2
217

318
**Feature**

Electron/vue2/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "room-uikit-electron-vue2",
3-
"version": "2.2.2",
3+
"version": "2.3.1",
44
"private": true,
55
"main": "main.electron.js",
66
"license": "MIT",
@@ -62,23 +62,21 @@
6262
"dependencies": {
6363
"@tencentcloud/chat": "latest",
6464
"@tencentcloud/tui-core": "latest",
65-
"@tencentcloud/tuiroom-engine-electron": "^2.2.2",
66-
"interactjs": "^1.10.26",
65+
"@tencentcloud/tuiroom-engine-electron": "^2.3.1",
6766
"@tencentcloud/universal-api": "^2.0.9",
6867
"axios": "^0.27.2",
6968
"core-js": "^3.8.3",
69+
"interactjs": "^1.10.26",
7070
"js-cookie": "^3.0.1",
7171
"lodash.isequal": "^4.5.0",
7272
"mitt": "^3.0.0",
7373
"pinia": "^2.0.28",
7474
"sass": "^1.57.1",
7575
"tim-js-sdk": "^2.24.2",
76-
"trtc-electron-sdk": "11.6.602-beta.0",
76+
7777
"tsignaling": "^0.10.0",
7878
"vue": "^2.7.14",
7979
"vue-class-component": "^7.2.3",
80-
"vue-i18n": "^8.28.2",
81-
"vue-i18n-bridge": "^9.2.2",
8280
"vue-property-decorator": "^9.1.2",
8381
"vue-router": "^3.6.5",
8482
"yuv-buffer": "^1.0.0",

Electron/vue2/src/TUIRoom/components/Chat/ChatEditor/useChatEditor.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ export default function useChatEditor() {
4444
isEmojiToolbarVisible.value = false;
4545
try {
4646
const tim = roomEngine.instance?.getTIM();
47+
if (!tim) {
48+
throw new Error('tim is null');
49+
}
4750
const message = tim.createTextMessage({
4851
to: roomId.value,
4952
conversationType: TencentCloudChat.TYPES.CONV_GROUP,

Electron/vue2/src/TUIRoom/components/Chat/MessageList/useMessageListHook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function useMessageList() {
2121

2222
async function handleGetHistoryMessageList() {
2323
const tim = roomEngine.instance?.getTIM();
24-
const imResponse = await tim.getMessageList({
24+
const imResponse = await tim?.getMessageList({
2525
conversationID: `GROUP${roomId.value}`,
2626
nextReqMessageID: nextReqMessageId.value,
2727
});

Electron/vue2/src/TUIRoom/components/ManageMember/MemberControl/index.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ function toggleClickMoreBtn() {
9898
}
9999
}
100100
101-
// 根据页面位置确定下拉框的定位
102101
function handleDropDownPosition() {
103102
const { top, bottom } = moreBtnRef.value?.getBoundingClientRect();
104-
const containerBottom = document.getElementById('memberListContainer')?.getBoundingClientRect()?.bottom;
105-
if (!containerBottom) {
103+
const { top: containerTop, bottom: containerBottom } = document.getElementById('memberListContainer')?.getBoundingClientRect() as DOMRect;
104+
if (!containerBottom || !containerTop) {
106105
return;
107106
}
108107
const bottomSize = containerBottom - bottom;
108+
const topSize = top - containerTop;
109109
let dropDownContainerHeight = 0;
110110
if (!showMoreControl.value) {
111111
operateListRef.value.style = 'display:block;position:absolute;z-index:-1000';
@@ -114,7 +114,10 @@ function handleDropDownPosition() {
114114
} else {
115115
dropDownContainerHeight = operateListRef.value?.offsetHeight;
116116
}
117-
if (bottomSize < top && bottomSize < dropDownContainerHeight) {
117+
if (topSize < dropDownContainerHeight) {
118+
return;
119+
}
120+
if (bottomSize < dropDownContainerHeight) {
118121
dropdownClass.value = 'up';
119122
}
120123
}

Electron/vue2/src/TUIRoom/components/ManageMember/MemberItemCommon/MemberInfo.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<svg-icon
1414
v-if="isTargetUserRoomOwner || isTargetUserAdmin"
1515
:icon="UserIcon"
16+
:color="isTargetUserAdmin ? '#F06C4B' : '#4791FF'"
1617
:class="isTargetUserAdmin ? 'admin-icon' : 'master-icon'"
1718
/>
1819
<div :class="`user-extra-info ${isTargetUserAdmin ? 'user-extra-info-admin' : ''}`">{{ extraInfo }}</div>

Electron/vue2/src/TUIRoom/components/ManageMember/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ const {
224224
}
225225
}
226226
.member-list-container {
227-
overflow-y: scroll;
228227
flex: 1;
229228
margin-top: 10px;
230229
overflow-y: scroll;

Electron/vue2/src/TUIRoom/components/RoomContent/StreamContainer/index.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
></stream-region>
1010
</div>
1111
<div :class="['stream-list-container', `${showSideList ? '' : 'hide-list'}`]">
12-
<div ref="streamListRef" :style="streamListStyle" class="stream-list">
12+
<div
13+
ref="streamListRef"
14+
:style="streamListStyle"
15+
class="stream-list"
16+
@scroll="handleStreamContainerScrollDebounce"
17+
@wheel="handleWheel"
18+
>
1319
<stream-region
1420
v-for="(stream) in streamList"
1521
v-show="showStreamList.indexOf(stream) > -1"
@@ -653,6 +659,11 @@ const handleStreamContainerScroll = async () => {
653659
roomStore.updateUserStreamVisible(streamUserIdList);
654660
};
655661
662+
// 处理顶部布局水平滑动
663+
function handleWheel(event: WheelEvent) {
664+
streamListRef.value.scrollLeft += event.deltaY;
665+
}
666+
656667
const handleStreamContainerScrollDebounce = debounce(handleStreamContainerScroll, 300);
657668
658669
onMounted(() => {

Electron/vue2/src/TUIRoom/components/RoomFooter/ApplyControl/MasterApplyControl/index.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,19 @@
3535
<span class="apply-text">{{ t('Currently no member has applied to go on stage') }}</span>
3636
</div>
3737
<template #footer>
38-
<tui-button size="default" :disabled="noUserApply" @click="handleAllUserApply(true)"> {{ t('Agree All') }} </tui-button>
39-
<tui-button class="cancel-button" size="default" :disabled="noUserApply" @click="handleAllUserApply(false)">
38+
<tui-button
39+
size="default"
40+
:disabled="applyToAnchorUserCount === 0"
41+
@click="handleAllUserApply(true)"
42+
>
43+
{{ t('Agree All') }}
44+
</tui-button>
45+
<tui-button
46+
class="cancel-button"
47+
size="default"
48+
:disabled="applyToAnchorUserCount === 0"
49+
@click="handleAllUserApply(false)"
50+
>
4051
{{ t('Reject All') }}
4152
</tui-button>
4253
</template>
@@ -46,7 +57,7 @@
4657

4758
<script setup lang="ts">
4859
import ApplyStageLabelIcon from '../../../common/icons/ApplyStageLabelIcon.vue';
49-
import useMasterApplyControl from './useMasterApplyControlHooks';
60+
import useMasterApplyControl from '../../../../hooks/useMasterApplyControl';
5061
import Avatar from '../../../common/Avatar.vue';
5162
import Dialog from '../../../common/base/Dialog/index.vue';
5263
import SvgIcon from '../../../common/base/SvgIcon.vue';
@@ -60,7 +71,6 @@ const {
6071
applyToAnchorList,
6172
handleAllUserApply,
6273
handleUserApply,
63-
noUserApply,
6474
} = useMasterApplyControl();
6575
</script>
6676

Electron/vue2/src/TUIRoom/components/RoomFooter/ApplyControl/MasterApplyControl/useMasterApplyControlHooks.ts

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)