yx-web-sdk 0.0.18 → 0.0.20

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.
Files changed (59) hide show
  1. package/dist/ait-person-popover/index.js +1 -1
  2. package/dist/chat-card/index.js +1 -1
  3. package/dist/chat-content/index.js +1 -1
  4. package/dist/chat-page/index.js +1 -1
  5. package/dist/chat-room/index.js +1 -1
  6. package/dist/common-avatar/index.js +1 -1
  7. package/dist/components/chat-card/index.vue.d.ts +2 -0
  8. package/dist/components/img-info-wrapper/index.d.ts +0 -0
  9. package/dist/{chat-page → components/img-info-wrapper}/index.vue.d.ts +2 -2
  10. package/dist/img-info-wrapper/index.js +1 -0
  11. package/dist/index/style2.css +30 -162
  12. package/dist/index/style4.css +177 -120
  13. package/dist/index/style6.css +513 -25
  14. package/dist/index/style7.css +143 -466
  15. package/dist/{index-0o2Mn1Jl.mjs → index-BPnLB3av.mjs} +1 -1
  16. package/dist/{index-C14AY1pk.mjs → index-DME8_VYv.mjs} +7 -6
  17. package/dist/{index-sJcDnl5D.mjs → index-Dwglj7_M.mjs} +1 -1
  18. package/dist/index-entry/index.js +5 -5
  19. package/dist/index-entry/style.css +19 -19
  20. package/dist/{index.vue_vue_type_script_setup_true_lang-0YeDxfed.mjs → index.vue_vue_type_script_setup_true_lang-C18d9C8W.mjs} +9 -3
  21. package/dist/{index.vue_vue_type_style_index_0_lang-UfvEW_0n.mjs → index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs} +137 -57
  22. package/dist/index.vue_vue_type_style_index_0_lang-CBpDXwwP.mjs +589 -0
  23. package/dist/{index.vue_vue_type_style_index_0_lang-BxxUcry3.mjs → index.vue_vue_type_style_index_0_lang-E3PcX8MA.mjs} +3 -3
  24. package/dist/{index.vue_vue_type_style_index_0_lang-BdIDeEyF.mjs → index.vue_vue_type_style_index_0_lang-QCNj8WyS.mjs} +171 -40
  25. package/dist/members-sidebar/index.js +1 -1
  26. package/dist/notice-box/index.js +1 -1
  27. package/dist/server-channel-sidebar/index.js +1 -1
  28. package/dist/stores/channel.d.ts +50 -14
  29. package/dist/stores/qchat.d.ts +3 -3
  30. package/dist/stores/sdk.d.ts +0 -8
  31. package/dist/stores/server.d.ts +26 -26
  32. package/dist/style.css +180 -90
  33. package/dist/types/qchat-server.d.ts +1 -1
  34. package/dist/utils/index.d.ts +10 -2
  35. package/dist/yx-web-sdk.es.js +644 -296
  36. package/dist/yx-web-sdk.umd.js +643 -295
  37. package/package.json +1 -1
  38. package/dist/ait-person-popover/index.d.ts +0 -3
  39. package/dist/ait-person-popover/index.vue.d.ts +0 -39
  40. package/dist/chat-card/index.d.ts +0 -3
  41. package/dist/chat-card/index.vue.d.ts +0 -25
  42. package/dist/chat-content/index.d.ts +0 -3
  43. package/dist/chat-content/index.vue.d.ts +0 -51
  44. package/dist/chat-page/index.d.ts +0 -3
  45. package/dist/chat-room/index.d.ts +0 -3
  46. package/dist/chat-room/index.vue.d.ts +0 -9
  47. package/dist/common-avatar/index.d.ts +0 -3
  48. package/dist/common-avatar/index.vue.d.ts +0 -17
  49. package/dist/icon-font/index.d.ts +0 -48
  50. package/dist/index-entry/index.d.ts +0 -2
  51. package/dist/index-entry/index.vue.d.ts +0 -24
  52. package/dist/index.vue_vue_type_style_index_0_lang-oO4NDv0U.mjs +0 -456
  53. package/dist/members-sidebar/index.d.ts +0 -3
  54. package/dist/members-sidebar/index.vue.d.ts +0 -4
  55. package/dist/notice-box/index.d.ts +0 -3
  56. package/dist/notice-box/index.vue.d.ts +0 -13
  57. package/dist/server-channel-sidebar/index.d.ts +0 -3
  58. package/dist/server-channel-sidebar/index.vue.d.ts +0 -21
  59. /package/dist/{index.vue_vue_type_style_index_0_lang-B2YRkoln.mjs → index.vue_vue_type_style_index_0_lang-BxXBf_VA.mjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { createVNode, defineComponent, ref, computed, watch, onUnmounted, openBlock, createElementBlock, normalizeClass, createElementVNode, unref, Fragment, renderList, withCtx, toDisplayString, createBlock, createCommentVNode, normalizeStyle, withModifiers, createTextVNode } from "vue";
2
2
  import { Form, Tooltip, Badge, Modal, Input, Button, message } from "ant-design-vue";
3
- import { u as useImSdkStore, a as useServerStore, b as useChannelStore, c as useUserStore, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-UfvEW_0n.mjs";
3
+ import { c as useImSdkStore, a as useServerStore, u as useChannelStore, b as useUserStore, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs";
4
4
  import { I as IconFont } from "./index-L_drmZir.mjs";
5
5
  import { I as Icon } from "./AntdIcon-DdvEPKFJ.mjs";
6
6
  import { C as CloseOutlined } from "./CloseOutlined-BEcmJaCc.mjs";
@@ -187,6 +187,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
187
187
  };
188
188
  const getChannelUnread = (channelId) => {
189
189
  const channel = channelList.value.find((c) => c.channelId === channelId);
190
+ console.log("channel", channel);
190
191
  return (channel == null ? void 0 : channel.unreadCount) || 0;
191
192
  };
192
193
  const handleSelectServer = async (server) => {
@@ -276,11 +277,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
276
277
  cancelText: "取消",
277
278
  wrapClassName: "delete-channel-modal",
278
279
  async onOk() {
279
- var _a;
280
+ var _a, _b;
280
281
  try {
281
- await window.qchat.qchatChannel.deleteChannel({
282
+ await ((_a = window.qchat) == null ? void 0 : _a.qchatChannel.deleteChannel({
282
283
  channelId: channelForm.value.channelId
283
- });
284
+ }));
284
285
  message.success("删除成功");
285
286
  channelModalVisible.value = false;
286
287
  await channelStore.getChannelsByPage({
@@ -288,7 +289,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
288
289
  timetag: 0,
289
290
  limit
290
291
  });
291
- if (((_a = currentChannel.value) == null ? void 0 : _a.channelId) === channelForm.value.channelId) {
292
+ if (((_b = currentChannel.value) == null ? void 0 : _b.channelId) === channelForm.value.channelId) {
292
293
  if (channelStore.channelList.length > 0) {
293
294
  emit("selectChannel", channelStore.channelList[0]);
294
295
  } else {
@@ -637,7 +638,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
637
638
  };
638
639
  }
639
640
  });
640
- const ServerChannelSidebar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aa044ccf"]]);
641
+ const ServerChannelSidebar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-961f30d7"]]);
641
642
  export {
642
643
  ServerChannelSidebar as S
643
644
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, watch, onBeforeUnmount, computed, openBlock, createBlock, Teleport, withDirectives, createElementVNode, normalizeStyle, createElementBlock, withModifiers, normalizeClass, toDisplayString, createCommentVNode, Fragment, renderList, createVNode, vShow } from "vue";
2
2
  import { autoUpdate, computePosition, offset, flip, shift } from "@floating-ui/dom";
3
- import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-UfvEW_0n.mjs";
3
+ import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
5
5
  const _hoisted_1 = { class: "ait-person-popover-content" };
6
6
  const _hoisted_2 = ["onMousedown"];
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, computed, ref, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, createElementVNode, Fragment, createBlock, createCommentVNode } from "vue";
2
2
  import { useRouter } from "vue-router";
3
3
  import { Spin, Result, Button, Empty, message } from "ant-design-vue";
4
- import { s as setGlobalRequest, u as useImSdkStore, a as useServerStore, b as useChannelStore, c as useUserStore, d as useGlobalStore } from "../index.vue_vue_type_style_index_0_lang-UfvEW_0n.mjs";
5
- import { _ as _sfc_main$1 } from "../index.vue_vue_type_style_index_0_lang-BxxUcry3.mjs";
6
- import { S as ServerChannelSidebar } from "../index-C14AY1pk.mjs";
7
- import { M as MembersSidebar } from "../index-0o2Mn1Jl.mjs";
4
+ import { s as setGlobalRequest, c as useImSdkStore, a as useServerStore, u as useChannelStore, b as useUserStore, d as useGlobalStore } from "../index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs";
5
+ import { _ as _sfc_main$1 } from "../index.vue_vue_type_style_index_0_lang-E3PcX8MA.mjs";
6
+ import { S as ServerChannelSidebar } from "../index-DME8_VYv.mjs";
7
+ import { M as MembersSidebar } from "../index-BPnLB3av.mjs";
8
8
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.mjs";
9
9
  const _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAB2lSURBVHgB7V17jF5Vtd9n2kJLOzPtUEpppyAoEdp7DT4SgUvCH+bWC5r4h20v8RUDNvGZWIpoNELt9Q8NhRKfMTw0ogRpMSExVwGjMXpv8ZGgjS3GSCG0PArclk5fU0pn37X27N+e31lnn2/K+b6ZGj0r+XrO2Wfvtdd7rb33fF+da6GFFlpooYUWWmihhRZaaKGFFlpooYUWWmihhRZaaKGFFlpo4R8RCnfqoE8+8+Rz+uzZs88YHR3V59Pk49Hh9NNPrww6duxYao/3hVy9tuEd94n4wGdhnj3hLWQMnhNOc19HS8IpbWPCz/GiKF49evTo6JIlS44+++yzR9wpgulWsCpxcM6cOfPGxsbmuCgYFRSgg6Jyyq3te5IwqfLsnJHG0jhWdDQUZ3g6MXPmzMMCI/I4rcruc9MDff39/WcKoxfI56yoXEDFY83Vcx8FEl7Fc+OHPdObMTznGOO0eDPzgaYxUq4nhRYuz0vfq6++OiDXYfHu84eGhgbcNMGUe/Dg4OCCAwcODAmjfRCC8RhYfbiiTb3ETYS+UuiMOLzxWoTIFC5t+OS5CC/jdCY0O6IrtYOeDD88V+18sV29eZ98jrsphBlu6qBPQvHS48ePz5fwFJiWqztx4kS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vlcXgGTTom3hccSoGfaQe9dfNgHPMJujT6qGGBhohX/xSnZznXQk/+6K4DHBImtO6aCUXIM3uZh6DAcOxX8URJTUGYJPCk3CjUVG1rLtM2ViCDzjU2NtbHOCLe8D+cKpi8C2WVDIoNAO06t4snaNaAEH103Pz587WfKrbxSdHJwFSFaIaDwtyr/EMiOYHXDTY/QOKt0vRZx6vw7LYfjCUXCViBNXT5wcHBpBCmk+Ys0akGEtNIwsf3sZ/i0K+iaDE1pcoNNLvpgWJoaKh/3759+N/SWAHZ/VkoKQqkgBeo0OHNblwJjrxVhV7hiT0M/UCXtut8itPSY+8zeMN8hl7HtEbadD4tolSho841/zLZa4XpUnCYKyp5BoTCL3V1YNuhbBU+hGW9NL53LGi+jq86SopUwTtcuT8UxtfYN43PHRRE+kPVjf5uXKH60QLquOviRKgbmE4FY75+EULl77EhNKtotEMBkru8hLdX5NUr7u8PvPmccphuBYc54cn6EBWmHlrpqMrW9xwipU1DXE+28f4Z4FQoGPMmT1YvZSWLEkPexTO8WfrokqJV7muAU6VgzK0HrzNEkeyhmsdKuTYagHpuV3++8s8Ip1LBmD8oecGCBUmh/E1JCdGuVW5zmOqNjslAlaqH2vonPzP3798fDE6VCg+WNg3LrXL/AUC3NHUrar6CG/fsU22ALbTQQgsttNBCCy200EILLbTQQgsttNBCCy200EILLbTQQgsttNBCC9MP/w+th51gX3tVWwAAAABJRU5ErkJggg==";
10
10
  const _hoisted_1 = { class: "qchat-container" };
@@ -341,7 +341,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
341
341
  };
342
342
  }
343
343
  });
344
- const IndexEntry = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-40788bbc"]]);
344
+ const IndexEntry = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-240f366f"]]);
345
345
  export {
346
346
  IndexEntry as default
347
347
  };
@@ -1,38 +1,38 @@
1
- .qchat-container[data-v-40788bbc] {
1
+ .qchat-container[data-v-240f366f] {
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
5
5
  color: var(--theme-text);
6
6
  font-family: "Whitney", "Helvetica Neue", Helvetica, Arial, sans-serif;
7
7
  }
8
- .loading-wrap[data-v-40788bbc],
9
- .error-wrap[data-v-40788bbc],
10
- .init-wrap[data-v-40788bbc] {
8
+ .loading-wrap[data-v-240f366f],
9
+ .error-wrap[data-v-240f366f],
10
+ .init-wrap[data-v-240f366f] {
11
11
  display: flex;
12
12
  align-items: center;
13
13
  justify-content: center;
14
14
  width: 100%;
15
15
  height: 100%;
16
16
  }
17
- .loading-wrap[data-v-40788bbc] .ant-spin-text,
18
- .error-wrap[data-v-40788bbc] .ant-spin-text,
19
- .init-wrap[data-v-40788bbc] .ant-spin-text {
17
+ .loading-wrap[data-v-240f366f] .ant-spin-text,
18
+ .error-wrap[data-v-240f366f] .ant-spin-text,
19
+ .init-wrap[data-v-240f366f] .ant-spin-text {
20
20
  color: #dcddde;
21
21
  }
22
- .loading-wrap[data-v-40788bbc] .ant-result-title,
23
- .loading-wrap[data-v-40788bbc] .ant-result-subtitle,
24
- .error-wrap[data-v-40788bbc] .ant-result-title,
25
- .error-wrap[data-v-40788bbc] .ant-result-subtitle,
26
- .init-wrap[data-v-40788bbc] .ant-result-title,
27
- .init-wrap[data-v-40788bbc] .ant-result-subtitle {
22
+ .loading-wrap[data-v-240f366f] .ant-result-title,
23
+ .loading-wrap[data-v-240f366f] .ant-result-subtitle,
24
+ .error-wrap[data-v-240f366f] .ant-result-title,
25
+ .error-wrap[data-v-240f366f] .ant-result-subtitle,
26
+ .init-wrap[data-v-240f366f] .ant-result-title,
27
+ .init-wrap[data-v-240f366f] .ant-result-subtitle {
28
28
  color: #dcddde;
29
29
  }
30
- .loading-wrap[data-v-40788bbc] .ant-empty-description,
31
- .error-wrap[data-v-40788bbc] .ant-empty-description,
32
- .init-wrap[data-v-40788bbc] .ant-empty-description {
30
+ .loading-wrap[data-v-240f366f] .ant-empty-description,
31
+ .error-wrap[data-v-240f366f] .ant-empty-description,
32
+ .init-wrap[data-v-240f366f] .ant-empty-description {
33
33
  color: #72767d;
34
34
  }
35
- .chat-main[data-v-40788bbc] {
35
+ .chat-main[data-v-240f366f] {
36
36
  flex: 1;
37
37
  display: flex;
38
38
  flex-direction: column;
@@ -40,12 +40,12 @@
40
40
  overflow: hidden;
41
41
  min-width: 300px;
42
42
  }
43
- .chat-main .no-channel[data-v-40788bbc] {
43
+ .chat-main .no-channel[data-v-240f366f] {
44
44
  display: flex;
45
45
  align-items: center;
46
46
  justify-content: center;
47
47
  height: 100%;
48
48
  }
49
- .chat-main .no-channel[data-v-40788bbc] .ant-empty-description {
49
+ .chat-main .no-channel[data-v-240f366f] .ant-empty-description {
50
50
  color: #72767d;
51
51
  }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, computed, watch, openBlock, createBlock, createElementBlock } from "vue";
2
- import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-BdIDeEyF.mjs";
3
- import { b as useChannelStore, a as useServerStore, c as useUserStore } from "./index.vue_vue_type_style_index_0_lang-UfvEW_0n.mjs";
2
+ import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-QCNj8WyS.mjs";
3
+ import { u as useChannelStore, a as useServerStore, b as useUserStore } from "./index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs";
4
4
  const _hoisted_1 = { key: 1 };
5
5
  const HISTORY_LIMIT = 100;
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -54,7 +54,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
54
  );
55
55
  const sendMessage = (type, file, option) => {
56
56
  if (type === "textMsg") {
57
- channelStore.sendTextMsg({ body: file, ext: option == null ? void 0 : option.ext, mentionAccids: option == null ? void 0 : option.mentionAccids });
57
+ channelStore.sendTextMsg({
58
+ body: file,
59
+ ext: option == null ? void 0 : option.ext,
60
+ mentionAccids: option == null ? void 0 : option.mentionAccids,
61
+ attach: option == null ? void 0 : option.attach
62
+ // 传递附件
63
+ });
58
64
  return;
59
65
  }
60
66
  if (type === "SendImg") {
@@ -86,12 +86,12 @@ const promiseDebounce = (func, wait) => {
86
86
  return function(...args) {
87
87
  return new Promise((resolve, reject) => {
88
88
  queue.push([resolve, reject]);
89
- clearTimeout(timer);
89
+ clearTimeout(timer ?? void 0);
90
90
  timer = setTimeout(() => {
91
91
  func.apply(this, args).then((res) => {
92
- queue.map((item) => item[0]).forEach((item) => item(res));
92
+ queue.forEach(([resolver]) => resolver(res));
93
93
  }).catch((err) => {
94
- queue.map((item) => item[1]).forEach((item) => item(err));
94
+ queue.forEach(([, rejecter]) => rejecter(err));
95
95
  }).finally(() => {
96
96
  queue.length = 0;
97
97
  timer = null;
@@ -119,6 +119,9 @@ function getImageMsgDisplaySize(attach) {
119
119
  h = Math.min(IMG_MSG_SIDE_MAX, h0 * scale);
120
120
  return { width: Math.round(w), height: Math.round(h) };
121
121
  }
122
+ const getMByteSize = (size) => {
123
+ return (size / 1024 / 1024).toFixed(2);
124
+ };
122
125
  const useGlobalStore = defineStore("global", {
123
126
  state: () => ({
124
127
  loginStatus: false
@@ -36065,7 +36068,6 @@ const useServerStore = defineStore("server", {
36065
36068
  async getSeverList(options) {
36066
36069
  if (window.qchat) {
36067
36070
  const res = await window.qchat.qchatServer.getServersByPage(options);
36068
- console.log("getSeverList", res);
36069
36071
  this.setSeverList(res);
36070
36072
  }
36071
36073
  },
@@ -36365,8 +36367,11 @@ const useChannelStore = defineStore("channel", {
36365
36367
  serverUnReadCountList: []
36366
36368
  }),
36367
36369
  actions: {
36368
- // 设置频道列表(原 mutations 转为 actions)
36369
- setChannelList(payload) {
36370
+ /**
36371
+ * 设置频道列表并获取未读数
36372
+ * @param payload 频道列表数据
36373
+ */
36374
+ async setChannelList(payload) {
36370
36375
  const serverStore = useServerStore();
36371
36376
  serverStore.resetServerUnReadCount();
36372
36377
  this.channelList = payload.datas;
@@ -36382,65 +36387,89 @@ const useChannelStore = defineStore("channel", {
36382
36387
  });
36383
36388
  }
36384
36389
  this.channelListQueryTag = payload.listQueryTag;
36390
+ await this.subscribleChannels();
36385
36391
  },
36386
- // 订阅频道(原 mutations 转为 actions)
36387
- subscribleChannels() {
36392
+ /**
36393
+ * 订阅频道并获取未读数
36394
+ * @description 先使用 getChannelUnreadInfos 主动查询未读数(获取登录前积累的未读),再订阅频道接收实时更新
36395
+ */
36396
+ async subscribleChannels() {
36397
+ var _a, _b;
36388
36398
  this.channelUnReadInfoList = [];
36389
36399
  const channels = [];
36390
36400
  this.channelList.forEach((item) => {
36391
36401
  channels.push({ serverId: item.serverId, channelId: item.channelId });
36392
36402
  });
36393
- window.qchat.qchatChannel.subscribeChannel({
36403
+ if (channels.length === 0) {
36404
+ return;
36405
+ }
36406
+ try {
36407
+ const unreadInfos = await ((_a = window.qchat) == null ? void 0 : _a.qchatChannel.getChannelUnreadInfos({
36408
+ channels
36409
+ }));
36410
+ this.applyUnreadInfosToChannels(unreadInfos);
36411
+ } catch (error) {
36412
+ console.error("[subscribleChannels] 查询未读数失败:", error);
36413
+ }
36414
+ (_b = window.qchat) == null ? void 0 : _b.qchatChannel.subscribeChannel({
36394
36415
  type: 2,
36395
36416
  opeType: 1,
36396
36417
  channels
36397
- }).then((resp) => {
36398
- const unreadInfos = resp;
36399
- unreadInfos.forEach((item) => {
36400
- if (this.channelList && this.channelList.length > 0) {
36401
- this.channelList.forEach((channelItem) => {
36402
- if (channelItem.channelId === item.channelId) {
36403
- channelItem["unreadCount"] = item.unreadCount;
36404
- }
36405
- });
36406
- }
36407
- this.channelUnReadInfoList.push({
36408
- channelId: item.channelId,
36409
- unreadCount: item.unreadCount,
36410
- serverId: item.serverId
36411
- });
36412
- });
36413
- this.serverUnReadCountList = [];
36414
- this.channelUnReadInfoList.forEach((item) => {
36415
- let existsFlag = false;
36416
- for (let index = 0; index < this.serverUnReadCountList.length; index++) {
36417
- const serverCount = this.serverUnReadCountList[index];
36418
- if (serverCount.serverId === item.serverId) {
36419
- existsFlag = true;
36420
- break;
36421
- }
36422
- }
36423
- if (!existsFlag) {
36424
- this.serverUnReadCountList.push({
36425
- serverId: item.serverId,
36426
- unreadCount: item.unreadCount
36427
- });
36428
- } else {
36429
- for (let index = 0; index < this.serverUnReadCountList.length; index++) {
36430
- const serverUnReadCountAgg = this.serverUnReadCountList[index];
36431
- if (serverUnReadCountAgg.serverId == item.serverId) {
36432
- serverUnReadCountAgg.unreadCount = serverUnReadCountAgg.unreadCount + item.unreadCount;
36433
- break;
36434
- }
36418
+ }).catch((error) => {
36419
+ console.error("[subscribleChannels] 订阅频道失败:", error);
36420
+ });
36421
+ },
36422
+ /**
36423
+ * 将未读信息应用到频道列表
36424
+ * @param unreadInfos 未读信息列表
36425
+ */
36426
+ applyUnreadInfosToChannels(unreadInfos) {
36427
+ unreadInfos.forEach((item) => {
36428
+ if (this.channelList && this.channelList.length > 0) {
36429
+ this.channelList.forEach((channelItem) => {
36430
+ if (channelItem.channelId === item.channelId) {
36431
+ channelItem["unreadCount"] = item.unreadCount;
36435
36432
  }
36436
- }
36433
+ });
36434
+ }
36435
+ this.channelUnReadInfoList.push({
36436
+ channelId: item.channelId,
36437
+ unreadCount: item.unreadCount,
36438
+ serverId: item.serverId
36437
36439
  });
36438
- const serverStore = useServerStore();
36439
- serverStore.setUnReadInfo(this.serverUnReadCountList);
36440
36440
  });
36441
+ this.serverUnReadCountList = [];
36442
+ this.channelUnReadInfoList.forEach((item) => {
36443
+ const existingServer = this.serverUnReadCountList.find(
36444
+ (s) => s.serverId === item.serverId
36445
+ );
36446
+ if (existingServer) {
36447
+ existingServer.unreadCount += item.unreadCount;
36448
+ } else {
36449
+ this.serverUnReadCountList.push({
36450
+ serverId: item.serverId,
36451
+ unreadCount: item.unreadCount
36452
+ });
36453
+ }
36454
+ });
36455
+ const serverStore = useServerStore();
36456
+ serverStore.setUnReadInfo(this.serverUnReadCountList);
36441
36457
  },
36442
- // 设置 channel 的未读消息数(原 mutations 转为 actions)
36458
+ /**
36459
+ * 设置 channel 的未读消息数
36460
+ * @param payload 未读信息
36461
+ * @description 如果是当前频道的未读更新,会忽略(因为用户正在查看该频道)
36462
+ */
36443
36463
  setUnReadNum(payload) {
36464
+ var _a;
36465
+ if (this.currentChannel && this.currentChannel.channelId === payload.channelId) {
36466
+ (_a = window.qchat) == null ? void 0 : _a.qchatMsg.markMessageRead({
36467
+ serverId: payload.serverId,
36468
+ channelId: payload.channelId,
36469
+ time: Date.now()
36470
+ });
36471
+ return;
36472
+ }
36444
36473
  if (this.channelList && this.channelList.length > 0) {
36445
36474
  this.channelList.forEach((channelItem) => {
36446
36475
  if (channelItem.channelId === payload.channelId) {
@@ -36517,6 +36546,7 @@ const useChannelStore = defineStore("channel", {
36517
36546
  },
36518
36547
  // 重置频道未读计数(原 mutations 转为 actions)
36519
36548
  resetChannelUnReadCount() {
36549
+ var _a;
36520
36550
  if (this.currentChannel) {
36521
36551
  if (this.channelUnReadInfoList) {
36522
36552
  let finalIndex = -1;
@@ -36550,7 +36580,7 @@ const useChannelStore = defineStore("channel", {
36550
36580
  maxCount: 99,
36551
36581
  lastMsgTime: (/* @__PURE__ */ new Date()).getTime()
36552
36582
  };
36553
- window.qchat.qchatMsg.markMessageRead(markMessageReadOption);
36583
+ (_a = window.qchat) == null ? void 0 : _a.qchatMsg.markMessageRead(markMessageReadOption);
36554
36584
  this.currentChannel["unreadCount"] = 0;
36555
36585
  }
36556
36586
  },
@@ -36599,6 +36629,15 @@ const useChannelStore = defineStore("channel", {
36599
36629
  (i) => payload.every((j) => j.msgIdClient !== i.msgIdClient)
36600
36630
  );
36601
36631
  },
36632
+ // 更新当前频道消息
36633
+ updateCurChannelMsgs(msg) {
36634
+ this.currentChannelMsgs = this.currentChannelMsgs.map((msgItem) => {
36635
+ if (msgItem.msgIdClient === msg.msgIdClient) {
36636
+ return msg;
36637
+ }
36638
+ return msgItem;
36639
+ });
36640
+ },
36602
36641
  // 设置当前频道消息(原 mutations 转为 actions)
36603
36642
  setCurChannelMsgs(payload) {
36604
36643
  this.currentChannelMsgs = payload;
@@ -36615,7 +36654,7 @@ const useChannelStore = defineStore("channel", {
36615
36654
  throw new Error("QChat no login");
36616
36655
  }
36617
36656
  const res = await window.qchat.qchatChannel.getChannelsByPage(options);
36618
- this.setChannelList(res);
36657
+ await this.setChannelList(res);
36619
36658
  },
36620
36659
  1e3
36621
36660
  );
@@ -36691,7 +36730,27 @@ const useChannelStore = defineStore("channel", {
36691
36730
  });
36692
36731
  return msgs;
36693
36732
  },
36694
- // 发送文本消息
36733
+ /**
36734
+ * 上传图片
36735
+ * @param options - 上传选项,包含图片文件和回调函数
36736
+ * @returns Promise<UploadFileResult> 返回上传结果,包含图片URL、宽高等信息
36737
+ */
36738
+ async uploadImage(options) {
36739
+ if (!window.qchat) {
36740
+ throw new Error("QChat no login");
36741
+ }
36742
+ const uploadResult = await window.qchat.cloudStorage.uploadFile({
36743
+ type: "image",
36744
+ file: options.file,
36745
+ onUploadStart: options.onUploadStart,
36746
+ onUploadDone: options.onUploadDone
36747
+ });
36748
+ return uploadResult;
36749
+ },
36750
+ /**
36751
+ * 发送文本消息
36752
+ * @param options - 发送选项,包含消息内容和可选附件
36753
+ */
36695
36754
  async sendTextMsg(options) {
36696
36755
  var _a;
36697
36756
  if (!window.qchat) {
@@ -36706,6 +36765,8 @@ const useChannelStore = defineStore("channel", {
36706
36765
  channelId: this.currentChannel.channelId,
36707
36766
  type: "text",
36708
36767
  body: options.body,
36768
+ attach: options == null ? void 0 : options.attach,
36769
+ // 如果有附件,塞到attach字段
36709
36770
  ext: (options == null ? void 0 : options.ext) ? JSON.stringify(options == null ? void 0 : options.ext) : void 0,
36710
36771
  mentionAccids: options == null ? void 0 : options.mentionAccids,
36711
36772
  onSendBefore: (msg2) => {
@@ -36852,6 +36913,15 @@ const useChannelStore = defineStore("channel", {
36852
36913
  this.addCurChannelMsgs({ data: [msg], isUnShift: false });
36853
36914
  }
36854
36915
  },
36916
+ // 撤回消息
36917
+ async revokeMessage(options) {
36918
+ if (!window.qchat) {
36919
+ throw new Error("QChat no login");
36920
+ }
36921
+ window.qchat.qchatMsg.revokeMessage(options).then((res) => {
36922
+ this.updateCurChannelMsgs(res);
36923
+ });
36924
+ },
36855
36925
  // 获取频道黑白名单
36856
36926
  async getWhiteBlackMembersPage(options) {
36857
36927
  if (!window.qchat) {
@@ -36892,6 +36962,9 @@ const useChannelStore = defineStore("channel", {
36892
36962
  },
36893
36963
  // 获取频道身份组
36894
36964
  async getChannelRoles(options) {
36965
+ if (!window.qchat) {
36966
+ throw new Error("QChat no login");
36967
+ }
36895
36968
  const res = await window.qchat.qchatRole.getChannelRoles(options);
36896
36969
  return res;
36897
36970
  },
@@ -36951,11 +37024,17 @@ const useChannelStore = defineStore("channel", {
36951
37024
  },
36952
37025
  // 获取成员角色
36953
37026
  async getMemberRoles(options) {
37027
+ if (!window.qchat) {
37028
+ throw new Error("QChat no login");
37029
+ }
36954
37030
  const res = await window.qchat.qchatRole.getMemberRoles(options);
36955
37031
  return res;
36956
37032
  },
36957
37033
  // 获取已存在的成员角色 accids
36958
37034
  async getExistingAccidsOfMemberRoles(options) {
37035
+ if (!window.qchat) {
37036
+ throw new Error("QChat no login");
37037
+ }
36959
37038
  const res = await window.qchat.qchatRole.getExistingAccidsOfMemberRoles(
36960
37039
  options
36961
37040
  );
@@ -37064,15 +37143,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37064
37143
  export {
37065
37144
  _sfc_main as _,
37066
37145
  useServerStore as a,
37067
- useChannelStore as b,
37068
- useUserStore as c,
37146
+ useUserStore as b,
37147
+ useImSdkStore as c,
37069
37148
  useGlobalStore as d,
37070
37149
  getImageMsgDisplaySize as e,
37071
37150
  filterStr as f,
37072
37151
  getServerMembersByAccids as g,
37152
+ getMByteSize as h,
37073
37153
  isLt as i,
37074
37154
  matchExt as m,
37075
37155
  parseFileSize as p,
37076
37156
  setGlobalRequest as s,
37077
- useImSdkStore as u
37157
+ useChannelStore as u
37078
37158
  };