tuikit-atomicx-vue3 4.5.1 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
- package/dist/{PopoverPortal-DghpKKm8.js → PopoverPortal-DV6zFXcf.js} +3 -3
- package/dist/{PopoverTrigger-BajjNkGO.js → PopoverTrigger-DIjW4PKa.js} +4 -4
- package/dist/{PopperContent-SLoFuK7k.js → PopperContent-D__dbwpA.js} +1 -1
- package/dist/{Teleport-DFrneqLM.js → Teleport-98QrIYDI.js} +278 -268
- package/dist/baseComp/Modal/Modal.js +3 -3
- package/dist/components/AudioSettingPanel/index.js +14 -14
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +2 -2
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +4 -4
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +53 -50
- package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
- package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +18 -18
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +13 -13
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +11 -11
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -75
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
- package/dist/components/ConversationList/i18n/en-US.d.ts +1 -0
- package/dist/components/ConversationList/i18n/en-US.js +2 -1
- package/dist/components/ConversationList/i18n/zh-CN.d.ts +1 -0
- package/dist/components/ConversationList/i18n/zh-CN.js +2 -1
- package/dist/components/ConversationList/index.d.ts +48 -0
- package/dist/components/LiveScenePanel/index.js +9 -10
- package/dist/components/MessageInput/AttachmentPicker/index.js +2 -2
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +2 -2
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/TextEditor/EditorCore.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +3 -3
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +1 -1
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
- package/dist/components/MessageList/MessageList.js +77 -67
- package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
- package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
- package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
- package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
- package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
- package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
- package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
- package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
- package/dist/components/VideoSettingPanel/index.js +1 -1
- package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
- package/dist/index-CTthrJb2.js +1461 -0
- package/dist/{index-CzCDLp99.js → index-DXC5bPY4.js} +32 -32
- package/dist/{index-C8Jw_xE4.js → index-DuAffztD.js} +1731 -1648
- package/dist/{index-CiYL_XsE.js → index-hHVD-MG2.js} +1 -1
- package/dist/index.js +59 -58
- package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
- package/dist/states/LoginState.js +43 -43
- package/dist/states/MessageInputState/MessageInputState.js +75 -78
- package/dist/states/MessageListState/MessageListState.js +26 -23
- package/dist/states/RoomParticipantState/index.js +83 -24
- package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
- package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
- package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
- package/dist/states/RoomParticipantState/participantManager.js +159 -127
- package/dist/states/RoomState/callManager.d.ts +3 -3
- package/dist/states/RoomState/callManager.js +20 -20
- package/dist/states/RoomState/common.d.ts +3 -2
- package/dist/states/RoomState/common.js +34 -24
- package/dist/states/RoomState/roomManager.d.ts +0 -1
- package/dist/states/RoomState/roomManager.js +21 -27
- package/dist/states/RoomState/scheduleManager.js +2 -2
- package/dist/styles/index.css +1 -1
- package/dist/subEntry/chat/chat.d.ts +48 -0
- package/dist/subEntry/live/index.js +46 -45
- package/dist/subEntry/room/index.js +39 -38
- package/dist/types/beauty.d.ts +20 -0
- package/dist/types/index.js +37 -36
- package/dist/types/participant.d.ts +2 -0
- package/dist/types/room.d.ts +45 -1
- package/dist/types/room.js +4 -3
- package/dist/{useId-D5WE76CM.js → useId-B1VwPJLm.js} +1 -1
- package/dist/utils/call.js +77 -71
- package/dist/{utils-CttDpxqz.js → utils-BU8IkP_V.js} +1 -1
- package/package.json +5 -6
- package/src/components/AudioSettingPanel/index.vue +4 -5
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
- package/src/components/ConversationList/ConversationList.vue +0 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +2 -2
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
- package/src/components/ConversationList/i18n/en-US.ts +1 -0
- package/src/components/ConversationList/i18n/zh-CN.ts +1 -0
- package/src/components/LiveScenePanel/index.vue +0 -1
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
- package/src/components/MessageList/MessageList.vue +14 -0
- package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
- package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
- package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
- package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
- package/src/components/VideoSettingPanel/index.vue +1 -0
- package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
- package/src/types/beauty.ts +20 -0
- package/src/types/participant.ts +3 -0
- package/src/types/room.ts +49 -1
- package/src/utils/call.ts +8 -0
- package/dist/index-BvFYOUyz.js +0 -2936
package/dist/utils/call.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { TUIChatEngine as
|
|
2
|
-
import
|
|
1
|
+
import { TUIChatEngine as L, TUIFriendService as U, TUIUserService as N } from "@tencentcloud/chat-uikit-engine";
|
|
2
|
+
import S, { TUIConstants as c } from "@tencentcloud/tui-core";
|
|
3
3
|
import { safeJSONParse as u } from "./json.js";
|
|
4
|
-
|
|
4
|
+
import "../components/UIKitModal/chatErrorModal/index.js";
|
|
5
|
+
import { showChatErrorModalById as R, ChatErrorModalId as k } from "../components/UIKitModal/chatErrorModal/chatErrorModal.js";
|
|
6
|
+
function G(a) {
|
|
5
7
|
try {
|
|
6
|
-
const e = u(
|
|
8
|
+
const e = u(a.payload.data, {});
|
|
7
9
|
if (e.businessID === 1 && e.data) {
|
|
8
|
-
const
|
|
9
|
-
if (
|
|
10
|
+
const i = u(e.data, {});
|
|
11
|
+
if (i.businessID === "av_call" || i.businessID === "rtc_call")
|
|
10
12
|
return !0;
|
|
11
13
|
}
|
|
12
14
|
} catch {
|
|
@@ -14,42 +16,46 @@ function P(r) {
|
|
|
14
16
|
}
|
|
15
17
|
return !1;
|
|
16
18
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
function H(a) {
|
|
20
|
+
if (!S.getService(c.TUICalling.SERVICE.NAME)) {
|
|
21
|
+
R(k.CALL_KIT_NOT_INTEGRATED);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
S.callService({
|
|
25
|
+
serviceName: c.TUICalling.SERVICE.NAME,
|
|
26
|
+
method: c.TUICalling.SERVICE.METHOD.START_CALL,
|
|
21
27
|
params: {
|
|
22
|
-
...
|
|
28
|
+
...a,
|
|
23
29
|
version: "v3"
|
|
24
30
|
}
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
|
-
function
|
|
28
|
-
const e = u(
|
|
33
|
+
function V(a) {
|
|
34
|
+
const e = u(a.payload.data, void 0);
|
|
29
35
|
if (!e)
|
|
30
36
|
return;
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
description:
|
|
34
|
-
extension:
|
|
37
|
+
const i = u(e.data, void 0);
|
|
38
|
+
return i ? {
|
|
39
|
+
description: a.payload.description,
|
|
40
|
+
extension: a.payload.extension,
|
|
35
41
|
data: {
|
|
36
42
|
businessID: e.businessID,
|
|
37
43
|
timeout: e.timeout,
|
|
38
44
|
data: {
|
|
39
|
-
businessID:
|
|
40
|
-
call_end:
|
|
41
|
-
call_type:
|
|
45
|
+
businessID: i.businessID,
|
|
46
|
+
call_end: i.call_end,
|
|
47
|
+
call_type: i.call_type,
|
|
42
48
|
data: {
|
|
43
|
-
cmd:
|
|
44
|
-
inviter:
|
|
45
|
-
message:
|
|
46
|
-
room_id:
|
|
47
|
-
str_room_id:
|
|
49
|
+
cmd: i.data.cmd,
|
|
50
|
+
inviter: i.data.inviter,
|
|
51
|
+
message: i.data.message,
|
|
52
|
+
room_id: i.data.room_id,
|
|
53
|
+
str_room_id: i.data.str_room_id
|
|
48
54
|
},
|
|
49
|
-
platform:
|
|
50
|
-
room_id:
|
|
51
|
-
userData:
|
|
52
|
-
version:
|
|
55
|
+
platform: i.platform,
|
|
56
|
+
room_id: i.room_id,
|
|
57
|
+
userData: i.userData,
|
|
58
|
+
version: i.version
|
|
53
59
|
},
|
|
54
60
|
inviteID: e.inviteID,
|
|
55
61
|
groupID: e.groupID,
|
|
@@ -59,74 +65,74 @@ function A(r) {
|
|
|
59
65
|
}
|
|
60
66
|
} : void 0;
|
|
61
67
|
}
|
|
62
|
-
function
|
|
63
|
-
if (!
|
|
68
|
+
function x(a) {
|
|
69
|
+
if (!a || a <= 0)
|
|
64
70
|
return "00:00";
|
|
65
|
-
const e = Math.floor(
|
|
66
|
-
return e > 0 ? `${e.toString().padStart(2, "0")}:${
|
|
71
|
+
const e = Math.floor(a / 3600), i = Math.floor(a % 3600 / 60), s = Math.floor(a % 60);
|
|
72
|
+
return e > 0 ? `${e.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}` : `${i.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
|
|
67
73
|
}
|
|
68
|
-
function
|
|
69
|
-
return !
|
|
74
|
+
function $(a, e = 12) {
|
|
75
|
+
return !a || a.length <= e ? a : `${a.substring(0, e)}...`;
|
|
70
76
|
}
|
|
71
|
-
function
|
|
72
|
-
return U.getFriendRemark([
|
|
77
|
+
function B(a) {
|
|
78
|
+
return U.getFriendRemark([a])[a] || "";
|
|
73
79
|
}
|
|
74
|
-
const
|
|
75
|
-
function
|
|
76
|
-
var
|
|
77
|
-
const
|
|
78
|
-
if (!
|
|
80
|
+
const f = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
81
|
+
function J(a, e) {
|
|
82
|
+
var g, _, m, p, C, M, h, I, v, T, w;
|
|
83
|
+
const i = V(a);
|
|
84
|
+
if (!i || i.data.businessID !== 1)
|
|
79
85
|
return "";
|
|
80
|
-
const { data:
|
|
81
|
-
let n = d ||
|
|
82
|
-
switch (n =
|
|
86
|
+
const { data: s } = i, r = s.data, l = a.fromAccount || a.from, d = B(l), t = L.getMyUserID();
|
|
87
|
+
let n = d || a.nameCard || a.nick || l;
|
|
88
|
+
switch (n = $(n), s.actionType) {
|
|
83
89
|
case 1:
|
|
84
|
-
return (((
|
|
90
|
+
return (((g = r == null ? void 0 : r.data) == null ? void 0 : g.cmd) === "audioCall" || ((_ = r == null ? void 0 : r.data) == null ? void 0 : _.cmd) === "videoCall") && s.groupID ? e("CallMessage.start_call", { messageSender: n }) : ((m = r == null ? void 0 : r.data) == null ? void 0 : m.cmd) === "hangup" ? s.groupID ? e("CallMessage.call_ended") : `${e("CallMessage.call_duration")}: ${x(r == null ? void 0 : r.call_end)}` : ((p = r == null ? void 0 : r.data) == null ? void 0 : p.cmd) === "switchToAudio" ? e("CallMessage.switch_to_audio_call") : ((C = r == null ? void 0 : r.data) == null ? void 0 : C.cmd) === "switchToVideo" ? e("CallMessage.switch_to_video_call") : e("CallMessage.start_call", { messageSender: "" });
|
|
85
91
|
case 2:
|
|
86
|
-
return
|
|
92
|
+
return s.groupID ? `${n} ${e("CallMessage.cancel_call")}` : s.inviter === t ? e("CallMessage.canceled") : e("CallMessage.canceled_by_recipient");
|
|
87
93
|
case 3:
|
|
88
|
-
return ((
|
|
94
|
+
return ((M = r == null ? void 0 : r.data) == null ? void 0 : M.cmd) === "switchToAudio" ? e("CallMessage.switch_to_audio_call") : ((h = r == null ? void 0 : r.data) == null ? void 0 : h.cmd) === "switchToVideo" ? e("CallMessage.switch_to_video_call") : s.groupID ? `${n} ${e("CallMessage.answered")}` : e("CallMessage.answered");
|
|
89
95
|
case 4:
|
|
90
|
-
return
|
|
96
|
+
return s.groupID ? `${n} ${e("CallMessage.decline_call")}` : (r == null ? void 0 : r.line_busy) === "line_busy" || ((I = r == null ? void 0 : r.data) == null ? void 0 : I.message) === "lineBusy" ? s.inviter === t ? e("CallMessage.line_busy") : e("CallMessage.missed_due_to_busy") : s.inviter === t ? e("CallMessage.declined_by_recipient") : e("CallMessage.declined");
|
|
91
97
|
case 5:
|
|
92
|
-
if (((v =
|
|
98
|
+
if (((v = r == null ? void 0 : r.data) == null ? void 0 : v.cmd) === "switchToAudio")
|
|
93
99
|
return e("CallMessage.switch_to_audio_call");
|
|
94
|
-
if (((
|
|
100
|
+
if (((T = r == null ? void 0 : r.data) == null ? void 0 : T.cmd) === "switchToVideo")
|
|
95
101
|
return e("CallMessage.switch_to_video_call");
|
|
96
|
-
if (
|
|
97
|
-
if (l ===
|
|
98
|
-
|
|
102
|
+
if (s.groupID) {
|
|
103
|
+
if (l === s.inviter) {
|
|
104
|
+
O(s.inviteeList);
|
|
99
105
|
let o = "";
|
|
100
|
-
return (w =
|
|
101
|
-
const
|
|
102
|
-
o += `${
|
|
106
|
+
return (w = s.inviteeList) == null || w.forEach((y) => {
|
|
107
|
+
const A = f.get(y) || y;
|
|
108
|
+
o += `${$(A)}、`;
|
|
103
109
|
}), o = o.substring(0, o.lastIndexOf("、")), `${o} ${e("CallMessage.no_answer")}`;
|
|
104
110
|
}
|
|
105
111
|
return `${n} ${e("CallMessage.no_answer")}`;
|
|
106
112
|
}
|
|
107
|
-
return
|
|
113
|
+
return s.inviter === t ? e("CallMessage.no_answer_from_recipient") : e("CallMessage.no_answer_timeout");
|
|
108
114
|
default:
|
|
109
115
|
return "";
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
118
|
+
function O(a = []) {
|
|
119
|
+
if (a.length === 0)
|
|
114
120
|
return;
|
|
115
|
-
const e = U.getFriendRemark(
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
}),
|
|
120
|
-
(
|
|
121
|
+
const e = U.getFriendRemark(a), i = [];
|
|
122
|
+
a.forEach((s) => {
|
|
123
|
+
const r = e[s];
|
|
124
|
+
r ? f.set(s, r) : E.has(s) || (i.push(s), E.set(s, 1));
|
|
125
|
+
}), i.length > 0 && N.getUserProfile({ userIDList: i }).then((s) => {
|
|
126
|
+
(s.data || []).forEach((l) => {
|
|
121
127
|
const { userID: d, nick: t } = l, n = t || d;
|
|
122
|
-
|
|
128
|
+
f.set(d, n);
|
|
123
129
|
});
|
|
124
130
|
}).catch(() => {
|
|
125
131
|
});
|
|
126
132
|
}
|
|
127
133
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
G as isCallMessage,
|
|
135
|
+
V as parseCallMessage,
|
|
136
|
+
J as parseCallMessageText,
|
|
137
|
+
H as startCall
|
|
132
138
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tuikit-atomicx-vue3",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"check-chinese:src": "node scripts/check-chinese-simple.js directory src",
|
|
42
42
|
"check-chinese:staged": "node scripts/check-chinese-simple.js staged",
|
|
43
43
|
"pre-commit": "npm run check-chinese:staged",
|
|
44
|
-
"publish": "npm publish --access public",
|
|
45
44
|
"test:pre": "node scripts/test-pre.js",
|
|
46
45
|
"test": "playwright test",
|
|
47
46
|
"test:ci": "playwright test || exit 0",
|
|
@@ -56,17 +55,17 @@
|
|
|
56
55
|
"@tencentcloud/chat": "^3.5.8",
|
|
57
56
|
"@tencentcloud/chat-uikit-engine": "~2.5.7",
|
|
58
57
|
"@tencentcloud/tui-core": "latest",
|
|
59
|
-
"@tencentcloud/tuiroom-engine-js": "~3.5.
|
|
60
|
-
"@tencentcloud/uikit-base-component-vue3": "1.3.
|
|
58
|
+
"@tencentcloud/tuiroom-engine-js": "~3.5.0",
|
|
59
|
+
"@tencentcloud/uikit-base-component-vue3": "1.3.2",
|
|
61
60
|
"vue": "^3.4.0"
|
|
62
61
|
},
|
|
63
62
|
"dependencies": {
|
|
64
63
|
"@tencentcloud/universal-api": "^2.4.0",
|
|
65
64
|
"@tiptap/extension-mention": "^2.11.5",
|
|
66
|
-
"@tiptap/suggestion": "2.11.5",
|
|
65
|
+
"@tiptap/suggestion": "^2.11.5",
|
|
67
66
|
"@tiptap/extension-image": "^2.11.5",
|
|
68
67
|
"@tiptap/extension-placeholder": "^2.11.5",
|
|
69
|
-
"@tiptap/pm": "^
|
|
68
|
+
"@tiptap/pm": "^2.11.5",
|
|
70
69
|
"@tiptap/starter-kit": "^2.11.5",
|
|
71
70
|
"@tiptap/vue-3": "^2.11.5",
|
|
72
71
|
"@vue/tsconfig": "^0.7.0",
|
|
@@ -131,18 +131,16 @@ const volumeTotalNum = ref(28);
|
|
|
131
131
|
const volumeNum = computed(() => {
|
|
132
132
|
if (isMicrophoneTesting.value) {
|
|
133
133
|
return (testingMicVolume.value * volumeTotalNum.value) / 100;
|
|
134
|
-
} else {
|
|
135
|
-
return (currentMicVolume.value * volumeTotalNum.value) / 100;
|
|
136
134
|
}
|
|
135
|
+
return (currentMicVolume.value * volumeTotalNum.value) / 100;
|
|
137
136
|
});
|
|
138
137
|
|
|
139
138
|
const showInputVolume = computed(() => {
|
|
140
139
|
if (props.micTestVisible) {
|
|
141
140
|
return isMicrophoneTesting.value;
|
|
142
|
-
} else {
|
|
143
|
-
return true;
|
|
144
141
|
}
|
|
145
|
-
|
|
142
|
+
return true;
|
|
143
|
+
});
|
|
146
144
|
|
|
147
145
|
const captureVolumeValue = ref(captureVolume.value);
|
|
148
146
|
const outputVolumeValue = ref(outputVolume.value);
|
|
@@ -161,6 +159,7 @@ watch(outputVolumeValue, async (value) => {
|
|
|
161
159
|
width: 100%;
|
|
162
160
|
font-size: 14px;
|
|
163
161
|
border-radius: 4px;
|
|
162
|
+
text-align: initial;
|
|
164
163
|
|
|
165
164
|
.item-setting {
|
|
166
165
|
width: 100%;
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
<TUIDropdown
|
|
26
26
|
v-else
|
|
27
27
|
trigger="click"
|
|
28
|
-
:teleported="
|
|
28
|
+
:teleported="true"
|
|
29
29
|
placement="bottom-end"
|
|
30
|
+
@visible-change="handleDropdownVisibleChange"
|
|
30
31
|
>
|
|
31
32
|
<div
|
|
32
33
|
:class="$style['conversationActions__popup-icon']"
|
|
@@ -71,6 +72,7 @@ const props = withDefaults(defineProps<ConversationActionsProps>(), {
|
|
|
71
72
|
const emit = defineEmits<{
|
|
72
73
|
click: [e: Event, key?: string, conversation?: ConversationModel];
|
|
73
74
|
close: [];
|
|
75
|
+
dropdownVisibleChange: [visible: boolean];
|
|
74
76
|
markConversationUnread: [conversation: ConversationModel, e?: Event];
|
|
75
77
|
conversationPin: [conversation: ConversationModel, e?: Event];
|
|
76
78
|
conversationMute: [conversation: ConversationModel, e?: Event];
|
|
@@ -169,6 +171,10 @@ const handleMaskClick = (e: Event) => {
|
|
|
169
171
|
props.onClose();
|
|
170
172
|
}
|
|
171
173
|
};
|
|
174
|
+
|
|
175
|
+
const handleDropdownVisibleChange = (visible: boolean) => {
|
|
176
|
+
emit('dropdownVisibleChange', visible);
|
|
177
|
+
};
|
|
172
178
|
</script>
|
|
173
179
|
|
|
174
180
|
<style lang="scss" module>
|
|
@@ -189,7 +189,11 @@ const handleCreateGroupConversation = async () => {
|
|
|
189
189
|
const conversation = await createGroupConversation(options);
|
|
190
190
|
_onConversationCreated(conversation);
|
|
191
191
|
} catch (error: any) {
|
|
192
|
-
|
|
192
|
+
if (error.code === 10021) {
|
|
193
|
+
TUIToast.error({ message: t('TUIConversation.group_id_already_used') });
|
|
194
|
+
} else {
|
|
195
|
+
TUIToast.error({ message: error.message });
|
|
196
|
+
}
|
|
193
197
|
}
|
|
194
198
|
};
|
|
195
199
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&--active {
|
|
21
|
-
background-color: var(--list-color-
|
|
21
|
+
background-color: var(--list-color-focused, #e3f2fd);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&--pin {
|
|
@@ -123,4 +123,4 @@
|
|
|
123
123
|
border-radius: 4px;
|
|
124
124
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
125
125
|
}
|
|
126
|
-
}
|
|
126
|
+
}
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
:conversation="conversation"
|
|
48
48
|
v-bind="actionsConfig"
|
|
49
49
|
@close="handleCloseActionsModal"
|
|
50
|
+
@dropdown-visible-change="handleDropdownVisibleChange"
|
|
50
51
|
/>
|
|
51
52
|
<component
|
|
52
53
|
:is="LastMessageTimestamp"
|
|
@@ -103,6 +104,7 @@ const { activeConversation, setActiveConversation } = useConversationListState()
|
|
|
103
104
|
|
|
104
105
|
const conversationPreviewRef = ref<HTMLElement>();
|
|
105
106
|
const isActionMenuActive = ref(false);
|
|
107
|
+
const isDropdownOpen = ref(false);
|
|
106
108
|
|
|
107
109
|
const { isHovered } = useMouseHover(conversationPreviewRef);
|
|
108
110
|
const { getEventHandlers } = useLongPress(() => {
|
|
@@ -115,6 +117,10 @@ const longPressEvents = getEventHandlers();
|
|
|
115
117
|
|
|
116
118
|
watch(isHovered, (newValue) => {
|
|
117
119
|
if (!isH5) {
|
|
120
|
+
// Don't hide when dropdown is open
|
|
121
|
+
if (!newValue && isDropdownOpen.value) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
118
124
|
isActionMenuActive.value = newValue;
|
|
119
125
|
}
|
|
120
126
|
});
|
|
@@ -127,6 +133,15 @@ const handleClick = () => {
|
|
|
127
133
|
const handleCloseActionsModal = () => {
|
|
128
134
|
isActionMenuActive.value = false;
|
|
129
135
|
};
|
|
136
|
+
|
|
137
|
+
const handleDropdownVisibleChange = (visible: boolean) => {
|
|
138
|
+
console.log('[ConversationPreview] dropdown visible changed:', visible);
|
|
139
|
+
isDropdownOpen.value = visible;
|
|
140
|
+
// When dropdown closes and mouse is not hovering, hide actions
|
|
141
|
+
if (!visible && !isHovered.value) {
|
|
142
|
+
isActionMenuActive.value = false;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
130
145
|
</script>
|
|
131
146
|
|
|
132
147
|
<style lang="scss" module>
|
|
@@ -75,5 +75,6 @@ export default {
|
|
|
75
75
|
'you_have_left_the_group_chat': 'You have left the group chat',
|
|
76
76
|
'someone_at_me': 'You were mentioned',
|
|
77
77
|
'at_all': '@All',
|
|
78
|
+
'group_id_already_used': 'The group ID for creating the group chat is already in use, please choose a different group ID.',
|
|
78
79
|
},
|
|
79
80
|
};
|
|
@@ -54,13 +54,22 @@ const readReceiptText = computed(() => {
|
|
|
54
54
|
return '';
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
const {
|
|
58
|
+
readCount,
|
|
59
|
+
unreadCount,
|
|
60
|
+
isPeerRead,
|
|
61
|
+
} = props.readReceiptInfo;
|
|
62
|
+
|
|
57
63
|
if (props.isGroup) {
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
64
|
+
if (unreadCount === undefined || readCount === undefined) {
|
|
65
|
+
return '';
|
|
66
|
+
}
|
|
67
|
+
if (unreadCount > 0) {
|
|
68
|
+
return `${unreadCount} ${t('MessageList.unread')} ·`;
|
|
60
69
|
}
|
|
61
70
|
return `${t('MessageList.all_read')} ·`;
|
|
62
71
|
}
|
|
63
|
-
if (
|
|
72
|
+
if (isPeerRead) {
|
|
64
73
|
return `${t('MessageList.read')} ·`;
|
|
65
74
|
}
|
|
66
75
|
return `${t('MessageList.unread')} ·`;
|
|
@@ -13,6 +13,7 @@ import type { Component } from 'vue';
|
|
|
13
13
|
import cs from 'classnames';
|
|
14
14
|
import { ObserverView } from '../../baseComp/ObserverView';
|
|
15
15
|
import { View } from '../../baseComp/View';
|
|
16
|
+
import { useReadReceipt } from '../../hooks/useReadReceipt/useReadReceipt';
|
|
16
17
|
import { useScroll } from '../../hooks/useScroll';
|
|
17
18
|
import { useConversationListState } from '../../states/ConversationListState';
|
|
18
19
|
import { useGroupSettingState } from '../../states/GroupSettingState';
|
|
@@ -88,6 +89,14 @@ const { getGroupMemberList } = useGroupSettingState();
|
|
|
88
89
|
|
|
89
90
|
const { scrollToBottom } = useScroll();
|
|
90
91
|
const { activeConversation } = useConversationListState();
|
|
92
|
+
const {
|
|
93
|
+
observeMessageList,
|
|
94
|
+
resetProcessedMessages,
|
|
95
|
+
} = useReadReceipt({
|
|
96
|
+
enabled: props.enableReadReceipt ?? false,
|
|
97
|
+
containerSelector: '#messageScrollList',
|
|
98
|
+
getMessageIDFromDom: (dom: HTMLElement) => dom.dataset.messageId || '',
|
|
99
|
+
});
|
|
91
100
|
|
|
92
101
|
const isGroup = computed(() => activeConversation.value?.type === ConversationType.GROUP);
|
|
93
102
|
const enableMessageAggregation = computed(() => props.messageAggregationTime && props.messageAggregationTime > 0);
|
|
@@ -176,6 +185,7 @@ const initializeMessageList = async () => {
|
|
|
176
185
|
isFinishFirstRender.value = false;
|
|
177
186
|
setIsDisableScroll(false);
|
|
178
187
|
isScrollToBottomVisible.value = false;
|
|
188
|
+
resetProcessedMessages();
|
|
179
189
|
};
|
|
180
190
|
|
|
181
191
|
// Load more history messages
|
|
@@ -232,6 +242,7 @@ watch(messageList, (newMessages, oldMessages) => {
|
|
|
232
242
|
nextTick(() => {
|
|
233
243
|
scrollToBottom({ behavior: 'instant' });
|
|
234
244
|
isFinishFirstRender.value = true;
|
|
245
|
+
observeMessageList();
|
|
235
246
|
});
|
|
236
247
|
if (isGroup.value) {
|
|
237
248
|
getGroupMemberList();
|
|
@@ -247,6 +258,9 @@ watch(messageList, (newMessages, oldMessages) => {
|
|
|
247
258
|
const oldLastMessage = oldMessages[oldMessages.length - 1];
|
|
248
259
|
|
|
249
260
|
if (newLastMessage?.ID !== oldLastMessage?.ID) {
|
|
261
|
+
nextTick(() => {
|
|
262
|
+
observeMessageList();
|
|
263
|
+
});
|
|
250
264
|
// new message coming
|
|
251
265
|
const shouldAutoScroll = newLastMessage.flow === 'out'
|
|
252
266
|
|| (!isDisableScroll.value && distanceToBottom.value < autoScrollThreshold);
|