@ndscnj/roomkit-web-vue3 25.12.24159 → 25.12.24162

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 (31) hide show
  1. package/es/assets/imgs/vote-icon.png.mjs +4 -0
  2. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue.d.ts +1 -7
  3. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue.mjs +1 -1
  4. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue2.mjs +53 -44
  5. package/es/components/RoomFooter/VoteControl/MoreControlPC.vue.mjs +5 -53
  6. package/es/components/RoomFooter/VoteControl/MoreControlPC.vue2.mjs +59 -1
  7. package/es/components/RoomFooter/VoteControl/index.d.ts +1 -7
  8. package/es/components/RoomFooter/VoteControl/index.mjs +2 -2
  9. package/es/components/RoomFooter/index/index.d.ts +1 -6
  10. package/es/components/RoomFooter/index/indexH5.vue.d.ts +1 -3
  11. package/es/components/RoomFooter/index/indexH5.vue.mjs +1 -1
  12. package/es/components/RoomFooter/index/indexH5.vue2.mjs +5 -19
  13. package/es/index.mjs +7 -39
  14. package/lib/assets/imgs/vote-icon.png.js +4 -0
  15. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue.d.ts +1 -7
  16. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue.js +1 -1
  17. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue2.js +52 -43
  18. package/lib/components/RoomFooter/VoteControl/MoreControlPC.vue.js +5 -53
  19. package/lib/components/RoomFooter/VoteControl/MoreControlPC.vue2.js +60 -2
  20. package/lib/components/RoomFooter/VoteControl/index.d.ts +1 -7
  21. package/lib/components/RoomFooter/VoteControl/index.js +2 -2
  22. package/lib/components/RoomFooter/index/index.d.ts +1 -6
  23. package/lib/components/RoomFooter/index/indexH5.vue.d.ts +1 -3
  24. package/lib/components/RoomFooter/index/indexH5.vue.js +1 -1
  25. package/lib/components/RoomFooter/index/indexH5.vue2.js +4 -18
  26. package/lib/index.js +7 -39
  27. package/package.json +1 -1
  28. package/src/TUIRoom/assets/imgs/vote-icon.png +0 -0
  29. package/src/TUIRoom/components/RoomFooter/VoteControl/MoreControlH5.vue +38 -75
  30. package/src/TUIRoom/components/RoomFooter/VoteControl/MoreControlPC.vue +7 -1
  31. package/src/TUIRoom/components/RoomFooter/index/indexH5.vue +3 -14
@@ -0,0 +1,4 @@
1
+ const _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAKhSURBVFiF7ZWxftMwEIf/F3lgI0yl1VDzBNwv8sBGusHWbt2IR6a2T9DyBC1P0HRkKmxsKVM7WI76BkxJx3RjiHMMOMW4tmO70Ilbkp9P0vfJ0p0VHhjMzFrrS631s8lkctF0vnooXCk1AvAcQF9rTU0lWgtk4CCitwAYwG5TiVYCWXiSJFtxHF+tra196nQ6b5pKNBZgZl8pdbmEO+ccANzc3PxoI9FIIIWPADzJwpfRRqK2QAbeLYK3laglkIH7IvJ+PB5/rRrfRGKlQA4exnE8rCNdV6JSoC28iQT9TXiv1xssFguXvx/M3FVKjQH4RLQVRdGdRKcpnJm7RXOCIDgiolOl1F5BejlnNp/PZ9nEPYEquDHmXCk1ZmY/DxeRQwAuSZKDkvUKq+eegFLquOK1nwHwlVKjpUQOvuWcu9thdjNEtFNUuvcEiOg6/X2dz1lrP4tIuJQIguC4DlxEwuy5/7Hh/IPJZHKhtSYA+xsbG/50Ov2SzU+nU7e+vn5LRLsAXtWBV13gwjKsIXGltf62PPO2cCzLkJm7nudxPikiewC2AQyttWHVQnk4gCERnZWNnc/nzjk3o8yntbC8MlEpkYPXjR0yxowAsIh8LBtFRC8BbBPRSRRFB/l87rafLBaL21VkInoHAJ6I+ETk4jg+qppgjDkVkf0gCG6jKLobmz9za22tdm2M2QQwKOyERZG+/qGIHAZBcITfLfY8hR80/VYAgNdksLU2NMYglXgqIn0ATEQfrLUnTeErBXq93qCoIeFXheynf2cismmMOS0Zdx3HcalcqQAzd4nouEZ1dAEMypJE9B1AcwHn3IyZX9QQWBWzqmTlEaQdrnKBh0btKvgv8K/CS29pP23JjxkMwHlJkoRpN+s/soBLkiT8CfdGvsMQPqX9AAAAAElFTkSuQmCC";
2
+ export {
3
+ _imports_0 as default
4
+ };
@@ -1,8 +1,2 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- "on-vote": (...args: any[]) => void;
4
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
5
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
6
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
7
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
2
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./MoreControlH5.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const MoreControlH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b8ad5a8b"]]);
4
+ const MoreControlH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70cfb5f8"]]);
5
5
  export {
6
6
  MoreControlH5 as default
7
7
  };
@@ -1,63 +1,72 @@
1
- import { defineComponent, ref, onMounted, onUnmounted, resolveDirective, createElementBlock, openBlock, createCommentVNode, unref, withDirectives, createBlock, withCtx, createVNode } from "vue";
2
- import { IconExtension } from "@tencentcloud/uikit-base-component-vue3";
1
+ import { defineComponent, createElementBlock, createCommentVNode, unref, openBlock, createVNode, createElementVNode, withCtx } from "vue";
2
+ import _imports_0 from "../../../assets/imgs/vote-icon.png.mjs";
3
3
  import IconButton from "../../common/base/IconButton.vue.mjs";
4
- import useControl from "./useMoreControlHooks.mjs";
4
+ import { IconChat } from "@tencentcloud/uikit-base-component-vue3";
5
+ import { useBasicStore } from "../../../stores/basic.mjs";
6
+ import { useChatStore } from "../../../stores/chat.mjs";
7
+ import { storeToRefs } from "pinia";
8
+ import { useI18n } from "../../../locales/index.mjs";
9
+ import TuiBadge from "../../common/base/Badge.vue.mjs";
5
10
  import "../../../services/main.mjs";
6
11
  import { roomService } from "../../../services/roomService.mjs";
7
- import "../../../locales/index.mjs";
8
12
  import "@tencentcloud/tuiroom-engine-js";
9
13
  import "../../../utils/environment.mjs";
10
14
  import "mitt";
11
15
  import "../../../services/manager/roomActionManager.mjs";
12
16
  import "@tencentcloud/tui-core";
17
+ import { MetricsKey } from "../../../services/manager/dataReportManager.mjs";
13
18
  const _hoisted_1 = {
14
19
  key: 0,
15
- class: "more-control-container"
20
+ class: "vote-control-container"
16
21
  };
17
22
  const _sfc_main = /* @__PURE__ */ defineComponent({
18
23
  __name: "MoreControlH5",
19
- emits: ["show-overlay", "on-vote"],
20
- setup(__props, { emit: __emit }) {
21
- const voteControlConfig = roomService.getComponentConfig("MoreControl");
22
- const showMoreContent = ref(false);
23
- const moreContentRef = ref();
24
- const { t, sidebarName, basicStore } = useControl();
25
- const emit = __emit;
26
- function showMore() {
27
- showMoreContent.value = true;
28
- emit("on-vote", {
29
- name: "onVote",
30
- visible: basicStore.isSidebarOpen
31
- });
32
- }
33
- function handleDocumentClick(event) {
34
- if (showMoreContent.value && !moreContentRef.value.contains(event.target)) {
35
- showMoreContent.value = false;
24
+ setup(__props) {
25
+ const { t } = useI18n();
26
+ const chatControlConfig = roomService.getComponentConfig("MoreControl");
27
+ const basicStore = useBasicStore();
28
+ const chatStore = useChatStore();
29
+ const { sidebarName } = storeToRefs(basicStore);
30
+ async function toggleChatSidebar() {
31
+ if (basicStore.isSidebarOpen && basicStore.sidebarName === "vote") {
32
+ basicStore.setSidebarOpenStatus(false);
33
+ basicStore.setSidebarName("");
34
+ return;
36
35
  }
36
+ basicStore.setSidebarOpenStatus(true);
37
+ basicStore.setSidebarName("vote");
38
+ chatStore.updateUnReadCount(0);
39
+ roomService.dataReportManager.reportCount(MetricsKey.openChat);
40
+ roomService.trackingManager.sendMessage("experience-vote");
37
41
  }
38
- onMounted(() => {
39
- document == null ? void 0 : document.addEventListener("click", handleDocumentClick, true);
40
- });
41
- onUnmounted(() => {
42
- document == null ? void 0 : document.removeEventListener("click", handleDocumentClick, true);
43
- });
44
42
  return (_ctx, _cache) => {
45
- const _directive_tap = resolveDirective("tap");
46
- return openBlock(), createElementBlock("div", null, [
47
- unref(voteControlConfig).visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
48
- withDirectives((openBlock(), createBlock(IconButton, {
49
- "is-active": unref(sidebarName) === "vote",
50
- title: unref(t)("Vote")
51
- }, {
52
- default: withCtx(() => [
53
- createVNode(unref(IconExtension), { size: "24" })
54
- ]),
55
- _: 1
56
- }, 8, ["is-active", "title"])), [
57
- [_directive_tap, showMore]
58
- ])
59
- ])) : createCommentVNode("", true)
60
- ]);
43
+ return unref(chatControlConfig).visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
44
+ createVNode(TuiBadge, {
45
+ hidden: unref(chatStore).unReadCount === 0,
46
+ value: unref(chatStore).unReadCount,
47
+ max: 10
48
+ }, {
49
+ default: withCtx(() => [
50
+ createVNode(IconButton, {
51
+ title: unref(t)("Vote"),
52
+ "is-active": unref(sidebarName) === "vote",
53
+ onClickIcon: toggleChatSidebar
54
+ }, {
55
+ default: withCtx(() => [
56
+ createVNode(unref(IconChat), { size: "24" })
57
+ ]),
58
+ _: 1
59
+ }, 8, ["title", "is-active"])
60
+ ]),
61
+ _: 1
62
+ }, 8, ["hidden", "value"]),
63
+ _cache[0] || (_cache[0] = createElementVNode("img", {
64
+ class: "ndsc-img-box",
65
+ src: _imports_0,
66
+ alt: "",
67
+ click: "toggleChatSidebar"
68
+ }, null, -1))
69
+ ])) : createCommentVNode("", true);
61
70
  };
62
71
  }
63
72
  });
@@ -1,55 +1,7 @@
1
- import { defineComponent, createElementBlock, createCommentVNode, unref, openBlock, createVNode, withCtx } from "vue";
2
- import { IconMore } from "@tencentcloud/uikit-base-component-vue3";
3
- import IconButton from "../../common/base/IconButton.vue.mjs";
4
- import useControl from "./useMoreControlHooks.mjs";
5
- import "../../../services/main.mjs";
6
- import { roomService } from "../../../services/roomService.mjs";
7
- import "../../../locales/index.mjs";
8
- import "@tencentcloud/tuiroom-engine-js";
9
- import "../../../utils/environment.mjs";
10
- import "mitt";
11
- import "../../../services/manager/roomActionManager.mjs";
12
- import "@tencentcloud/tui-core";
13
- const _hoisted_1 = {
14
- key: 0,
15
- class: "more-control-container"
16
- };
17
- const _sfc_main = /* @__PURE__ */ defineComponent({
18
- __name: "MoreControlPC",
19
- emits: ["on-vote"],
20
- setup(__props, { emit: __emit }) {
21
- const moreControlConfig = roomService.getComponentConfig("MoreControl");
22
- const { t, basicStore, sidebarName } = useControl();
23
- const emit = __emit;
24
- function toggleMoreSidebar() {
25
- if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
26
- basicStore.setSidebarOpenStatus(false);
27
- basicStore.setSidebarName("");
28
- return;
29
- }
30
- basicStore.setSidebarOpenStatus(true);
31
- basicStore.setSidebarName("vote");
32
- emit("on-vote", {
33
- name: "onVote",
34
- visible: basicStore.isSidebarOpen
35
- });
36
- }
37
- return (_ctx, _cache) => {
38
- return unref(moreControlConfig).visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
39
- createVNode(IconButton, {
40
- "is-active": unref(sidebarName) === "vote",
41
- title: unref(t)("Vote"),
42
- onClickIcon: toggleMoreSidebar
43
- }, {
44
- default: withCtx(() => [
45
- createVNode(unref(IconMore), { size: "24" })
46
- ]),
47
- _: 1
48
- }, 8, ["is-active", "title"])
49
- ])) : createCommentVNode("", true);
50
- };
51
- }
52
- });
1
+ import _sfc_main from "./MoreControlPC.vue2.mjs";
2
+ /* empty css */
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const MoreControlPc = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-50420946"]]);
53
5
  export {
54
- _sfc_main as default
6
+ MoreControlPc as default
55
7
  };
@@ -1,4 +1,62 @@
1
- import _sfc_main from "./MoreControlPC.vue.mjs";
1
+ import { defineComponent, createElementBlock, createCommentVNode, unref, openBlock, createVNode, createElementVNode, withCtx } from "vue";
2
+ import _imports_0 from "../../../assets/imgs/vote-icon.png.mjs";
3
+ import { IconMore } from "@tencentcloud/uikit-base-component-vue3";
4
+ import IconButton from "../../common/base/IconButton.vue.mjs";
5
+ import useControl from "./useMoreControlHooks.mjs";
6
+ import "../../../services/main.mjs";
7
+ import { roomService } from "../../../services/roomService.mjs";
8
+ import "../../../locales/index.mjs";
9
+ import "@tencentcloud/tuiroom-engine-js";
10
+ import "../../../utils/environment.mjs";
11
+ import "mitt";
12
+ import "../../../services/manager/roomActionManager.mjs";
13
+ import "@tencentcloud/tui-core";
14
+ const _hoisted_1 = {
15
+ key: 0,
16
+ class: "more-control-container"
17
+ };
18
+ const _sfc_main = /* @__PURE__ */ defineComponent({
19
+ __name: "MoreControlPC",
20
+ emits: ["on-vote"],
21
+ setup(__props, { emit: __emit }) {
22
+ const moreControlConfig = roomService.getComponentConfig("MoreControl");
23
+ const { t, basicStore, sidebarName } = useControl();
24
+ const emit = __emit;
25
+ function toggleMoreSidebar() {
26
+ if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
27
+ basicStore.setSidebarOpenStatus(false);
28
+ basicStore.setSidebarName("");
29
+ return;
30
+ }
31
+ basicStore.setSidebarOpenStatus(true);
32
+ basicStore.setSidebarName("vote");
33
+ emit("on-vote", {
34
+ name: "onVote",
35
+ visible: basicStore.isSidebarOpen
36
+ });
37
+ }
38
+ return (_ctx, _cache) => {
39
+ return unref(moreControlConfig).visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
40
+ createVNode(IconButton, {
41
+ "is-active": unref(sidebarName) === "vote",
42
+ title: unref(t)("Vote"),
43
+ onClickIcon: toggleMoreSidebar
44
+ }, {
45
+ default: withCtx(() => [
46
+ createVNode(unref(IconMore), { size: "24" })
47
+ ]),
48
+ _: 1
49
+ }, 8, ["is-active", "title"]),
50
+ _cache[0] || (_cache[0] = createElementVNode("img", {
51
+ class: "ndsc-img-box",
52
+ src: _imports_0,
53
+ alt: "",
54
+ click: "toggleMoreSidebar"
55
+ }, null, -1))
56
+ ])) : createCommentVNode("", true);
57
+ };
58
+ }
59
+ });
2
60
  export {
3
61
  _sfc_main as default
4
62
  };
@@ -1,10 +1,4 @@
1
- declare const MoreControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- "on-vote": (...args: any[]) => void;
4
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
5
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
6
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
7
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1
+ declare const MoreControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
2
  "on-vote": (...args: any[]) => void;
9
3
  }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
10
4
  "onOn-vote"?: ((...args: any[]) => any) | undefined;
@@ -1,7 +1,7 @@
1
1
  import MoreControlH5 from "./MoreControlH5.vue.mjs";
2
- import _sfc_main from "./MoreControlPC.vue.mjs";
2
+ import MoreControlPc from "./MoreControlPC.vue.mjs";
3
3
  import { isMobile } from "../../../utils/environment.mjs";
4
- const MoreControl = isMobile ? MoreControlH5 : _sfc_main;
4
+ const MoreControl = isMobile ? MoreControlH5 : MoreControlPc;
5
5
  export {
6
6
  MoreControl as default
7
7
  };
@@ -1,10 +1,8 @@
1
1
  declare const Index: ({
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
3
3
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
4
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
5
4
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
5
  "show-overlay": (...args: any[]) => void;
7
- "on-vote": (...args: any[]) => void;
8
6
  }, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
9
7
  P: {};
10
8
  B: {};
@@ -14,20 +12,17 @@ declare const Index: ({
14
12
  Defaults: {};
15
13
  }, Readonly<{}> & Readonly<{
16
14
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
17
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
18
15
  }>, {}, {}, {}, {}, {}>;
19
16
  __isFragment?: never;
20
17
  __isTeleport?: never;
21
18
  __isSuspense?: never;
22
19
  } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{
23
20
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
24
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
25
21
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
22
  "show-overlay": (...args: any[]) => void;
27
- "on-vote": (...args: any[]) => void;
28
23
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
29
24
  $slots: {
30
- content?(_: {}): any;
25
+ contentH5?(_: {}): any;
31
26
  };
32
27
  })) | ({
33
28
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
@@ -1,12 +1,10 @@
1
1
  declare function __VLS_template(): {
2
- content?(_: {}): any;
2
+ contentH5?(_: {}): any;
3
3
  };
4
4
  declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
5
  "show-overlay": (...args: any[]) => void;
6
- "on-vote": (...args: any[]) => void;
7
6
  }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
8
7
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
9
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
10
8
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
9
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
12
10
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./indexH5.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const indexH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ee2c0715"]]);
4
+ const indexH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-253a50f0"]]);
5
5
  export {
6
6
  indexH5 as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, createElementBlock, openBlock, withDirectives, createCommentVNode, createVNode, unref, createBlock, withCtx, renderSlot } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, withDirectives, createCommentVNode, renderSlot, createVNode, unref, createBlock } from "vue";
2
2
  import _sfc_main$1 from "../../../core/components/AudioSetting/index.vue.mjs";
3
3
  import VideoSetting from "../../../core/components/VideoSetting/index.vue.mjs";
4
4
  import "@tencentcloud/uikit-base-component-vue3";
@@ -55,21 +55,17 @@ import _sfc_main$4 from "../ManageMemberControl.vue.mjs";
55
55
  import _sfc_main$2 from "../ChatControl.vue.mjs";
56
56
  import _sfc_main$3 from "../ManageStageControl.vue.mjs";
57
57
  import MemberApplyControl from "../ApplyControl/MemberApplyControl.vue.mjs";
58
- import MoreControl$1 from "../MoreControl/index.mjs";
59
- import MoreControl from "../VoteControl/index.mjs";
58
+ import MoreControl from "../MoreControl/index.mjs";
60
59
  import AIControl from "../AIControl.vue.mjs";
61
60
  import bus from "../../../hooks/useMitt.mjs";
62
61
  import useRoomFooter from "./useRoomFooterHooks.mjs";
63
62
  const _hoisted_1 = { class: "footer-container" };
64
63
  const _sfc_main = /* @__PURE__ */ defineComponent({
65
64
  __name: "indexH5",
66
- emits: ["show-overlay", "on-vote"],
65
+ emits: ["show-overlay"],
67
66
  setup(__props, { emit: __emit }) {
68
67
  const { roomStore, isMaster, isAdmin, isAudience } = useRoomFooter();
69
68
  const emit = __emit;
70
- const onVote = (data) => {
71
- emit("on-vote", { code: data.visible, message: "vote" });
72
- };
73
69
  function handleControlClick(name) {
74
70
  bus.emit("experience-communication", name);
75
71
  }
@@ -93,17 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
89
  !unref(roomStore).isSpeakAfterTakingSeatMode ? withDirectives((openBlock(), createBlock(_sfc_main$2, { key: 2 }, null, 512)), [
94
90
  [unref(vTap), () => handleControlClick("chatControl")]
95
91
  ]) : createCommentVNode("", true),
96
- withDirectives((openBlock(), createBlock(unref(MoreControl), {
97
- onShowOverlay: handleShowOverlay,
98
- onOnVote: onVote
99
- }, {
100
- content: withCtx(() => [
101
- renderSlot(_ctx.$slots, "content", {}, void 0, true)
102
- ]),
103
- _: 3
104
- })), [
105
- [unref(vTap), () => handleControlClick("voteControl")]
106
- ]),
92
+ renderSlot(_ctx.$slots, "contentH5", {}, void 0, true),
107
93
  createVNode(AIControl, {
108
94
  onClick: _cache[0] || (_cache[0] = ($event) => handleControlClick("AIControl"))
109
95
  }),
@@ -116,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
116
102
  withDirectives(createVNode(_sfc_main$4, null, null, 512), [
117
103
  [unref(vTap), () => handleControlClick("manageMemberControl")]
118
104
  ]),
119
- withDirectives(createVNode(unref(MoreControl$1), { onShowOverlay: handleShowOverlay }, null, 512), [
105
+ withDirectives(createVNode(unref(MoreControl), { onShowOverlay: handleShowOverlay }, null, 512), [
120
106
  [unref(vTap), () => handleControlClick("moreControl")]
121
107
  ])
122
108
  ]);
package/es/index.mjs CHANGED
@@ -3635,44 +3635,6 @@ to {
3635
3635
  border-radius: 8px;
3636
3636
  color: var(--text-color-primary);
3637
3637
  background-color: var(--button-color-secondary-default);
3638
- }.show-more-content[data-v-b8ad5a8b] {
3639
- position: absolute;
3640
- bottom: 15px;
3641
- left: 5%;
3642
- width: 90%;
3643
- height: 17vh;
3644
- padding: 10px;
3645
- border-radius: 13px;
3646
- animation-name: popup-b8ad5a8b;
3647
- animation-duration: 200ms;
3648
- background-color: var(--bg-color-operate);
3649
- }
3650
- @keyframes popup-b8ad5a8b {
3651
- from {
3652
- bottom: 0;
3653
- }
3654
- to {
3655
- bottom: 15px;
3656
- }
3657
- }
3658
- .control-compent[data-v-b8ad5a8b] {
3659
- display: flex;
3660
- }
3661
- .close[data-v-b8ad5a8b] {
3662
- position: relative;
3663
- top: 10%;
3664
- display: flex;
3665
- align-items: center;
3666
- justify-content: center;
3667
- width: 100%;
3668
- padding: 10px;
3669
- font-style: normal;
3670
- font-weight: 400;
3671
- line-height: 24px;
3672
- text-align: center;
3673
- border-radius: 8px;
3674
- color: var(--text-color-primary);
3675
- background-color: var(--button-color-secondary-default);
3676
3638
  }.tool-box[data-v-34681937] {
3677
3639
  position: absolute;
3678
3640
  bottom: 72px;
@@ -3702,7 +3664,7 @@ to {
3702
3664
  .tool-box .tool-box-item[data-v-34681937]:hover {
3703
3665
  border-radius: 8px;
3704
3666
  background-color: var(--list-color-hover);
3705
- }.footer-container[data-v-ee2c0715] {
3667
+ }.footer-container[data-v-253a50f0] {
3706
3668
  position: absolute;
3707
3669
  bottom: 0;
3708
3670
  display: flex;
@@ -3966,6 +3928,12 @@ to {
3966
3928
  }
3967
3929
  .footer .mirror-container .mirror-text[data-v-21a63691] {
3968
3930
  margin-left: 4px;
3931
+ }.ndsc-img-box[data-v-70cfb5f8] {
3932
+ width: 50px;
3933
+ height: 50px;
3934
+ }.ndsc-img-box[data-v-50420946] {
3935
+ width: 50px;
3936
+ height: 50px;
3969
3937
  }.footer-container[data-v-4afcea78] {
3970
3938
  position: absolute;
3971
3939
  bottom: 0;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAKhSURBVFiF7ZWxftMwEIf/F3lgI0yl1VDzBNwv8sBGusHWbt2IR6a2T9DyBC1P0HRkKmxsKVM7WI76BkxJx3RjiHMMOMW4tmO70Ilbkp9P0vfJ0p0VHhjMzFrrS631s8lkctF0vnooXCk1AvAcQF9rTU0lWgtk4CCitwAYwG5TiVYCWXiSJFtxHF+tra196nQ6b5pKNBZgZl8pdbmEO+ccANzc3PxoI9FIIIWPADzJwpfRRqK2QAbeLYK3laglkIH7IvJ+PB5/rRrfRGKlQA4exnE8rCNdV6JSoC28iQT9TXiv1xssFguXvx/M3FVKjQH4RLQVRdGdRKcpnJm7RXOCIDgiolOl1F5BejlnNp/PZ9nEPYEquDHmXCk1ZmY/DxeRQwAuSZKDkvUKq+eegFLquOK1nwHwlVKjpUQOvuWcu9thdjNEtFNUuvcEiOg6/X2dz1lrP4tIuJQIguC4DlxEwuy5/7Hh/IPJZHKhtSYA+xsbG/50Ov2SzU+nU7e+vn5LRLsAXtWBV13gwjKsIXGltf62PPO2cCzLkJm7nudxPikiewC2AQyttWHVQnk4gCERnZWNnc/nzjk3o8yntbC8MlEpkYPXjR0yxowAsIh8LBtFRC8BbBPRSRRFB/l87rafLBaL21VkInoHAJ6I+ETk4jg+qppgjDkVkf0gCG6jKLobmz9za22tdm2M2QQwKOyERZG+/qGIHAZBcITfLfY8hR80/VYAgNdksLU2NMYglXgqIn0ATEQfrLUnTeErBXq93qCoIeFXheynf2cismmMOS0Zdx3HcalcqQAzd4nouEZ1dAEMypJE9B1AcwHn3IyZX9QQWBWzqmTlEaQdrnKBh0btKvgv8K/CS29pP23JjxkMwHlJkoRpN+s/soBLkiT8CfdGvsMQPqX9AAAAAElFTkSuQmCC";
4
+ exports.default = _imports_0;
@@ -1,8 +1,2 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- "on-vote": (...args: any[]) => void;
4
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
5
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
6
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
7
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
2
  export default _default;
@@ -3,5 +3,5 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const MoreControlH5_vue_vue_type_script_setup_true_lang = require("./MoreControlH5.vue2.js");
4
4
  ;/* empty css */
5
5
  const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
6
- const MoreControlH5 = /* @__PURE__ */ _pluginVue_exportHelper.default(MoreControlH5_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-b8ad5a8b"]]);
6
+ const MoreControlH5 = /* @__PURE__ */ _pluginVue_exportHelper.default(MoreControlH5_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-70cfb5f8"]]);
7
7
  exports.default = MoreControlH5;
@@ -1,65 +1,74 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const Vue = require("vue");
4
- const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
4
+ const voteIcon = require("../../../assets/imgs/vote-icon.png.js");
5
5
  const IconButton = require("../../common/base/IconButton.vue.js");
6
- const useMoreControlHooks = require("./useMoreControlHooks.js");
6
+ const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
7
+ const basic = require("../../../stores/basic.js");
8
+ const chat = require("../../../stores/chat.js");
9
+ const pinia = require("pinia");
10
+ const index = require("../../../locales/index.js");
11
+ const Badge = require("../../common/base/Badge.vue.js");
7
12
  require("../../../services/main.js");
8
13
  const roomService = require("../../../services/roomService.js");
9
- require("../../../locales/index.js");
10
14
  require("@tencentcloud/tuiroom-engine-js");
11
15
  require("../../../utils/environment.js");
12
16
  require("mitt");
13
17
  require("../../../services/manager/roomActionManager.js");
14
18
  require("@tencentcloud/tui-core");
19
+ const dataReportManager = require("../../../services/manager/dataReportManager.js");
15
20
  const _hoisted_1 = {
16
21
  key: 0,
17
- class: "more-control-container"
22
+ class: "vote-control-container"
18
23
  };
19
24
  const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
20
25
  __name: "MoreControlH5",
21
- emits: ["show-overlay", "on-vote"],
22
- setup(__props, { emit: __emit }) {
23
- const voteControlConfig = roomService.roomService.getComponentConfig("MoreControl");
24
- const showMoreContent = Vue.ref(false);
25
- const moreContentRef = Vue.ref();
26
- const { t, sidebarName, basicStore } = useMoreControlHooks.default();
27
- const emit = __emit;
28
- function showMore() {
29
- showMoreContent.value = true;
30
- emit("on-vote", {
31
- name: "onVote",
32
- visible: basicStore.isSidebarOpen
33
- });
34
- }
35
- function handleDocumentClick(event) {
36
- if (showMoreContent.value && !moreContentRef.value.contains(event.target)) {
37
- showMoreContent.value = false;
26
+ setup(__props) {
27
+ const { t } = index.useI18n();
28
+ const chatControlConfig = roomService.roomService.getComponentConfig("MoreControl");
29
+ const basicStore = basic.useBasicStore();
30
+ const chatStore = chat.useChatStore();
31
+ const { sidebarName } = pinia.storeToRefs(basicStore);
32
+ async function toggleChatSidebar() {
33
+ if (basicStore.isSidebarOpen && basicStore.sidebarName === "vote") {
34
+ basicStore.setSidebarOpenStatus(false);
35
+ basicStore.setSidebarName("");
36
+ return;
38
37
  }
38
+ basicStore.setSidebarOpenStatus(true);
39
+ basicStore.setSidebarName("vote");
40
+ chatStore.updateUnReadCount(0);
41
+ roomService.roomService.dataReportManager.reportCount(dataReportManager.MetricsKey.openChat);
42
+ roomService.roomService.trackingManager.sendMessage("experience-vote");
39
43
  }
40
- Vue.onMounted(() => {
41
- document == null ? void 0 : document.addEventListener("click", handleDocumentClick, true);
42
- });
43
- Vue.onUnmounted(() => {
44
- document == null ? void 0 : document.removeEventListener("click", handleDocumentClick, true);
45
- });
46
44
  return (_ctx, _cache) => {
47
- const _directive_tap = Vue.resolveDirective("tap");
48
- return Vue.openBlock(), Vue.createElementBlock("div", null, [
49
- Vue.unref(voteControlConfig).visible ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
50
- Vue.withDirectives((Vue.openBlock(), Vue.createBlock(IconButton.default, {
51
- "is-active": Vue.unref(sidebarName) === "vote",
52
- title: Vue.unref(t)("Vote")
53
- }, {
54
- default: Vue.withCtx(() => [
55
- Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconExtension), { size: "24" })
56
- ]),
57
- _: 1
58
- }, 8, ["is-active", "title"])), [
59
- [_directive_tap, showMore]
60
- ])
61
- ])) : Vue.createCommentVNode("", true)
62
- ]);
45
+ return Vue.unref(chatControlConfig).visible ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
46
+ Vue.createVNode(Badge.default, {
47
+ hidden: Vue.unref(chatStore).unReadCount === 0,
48
+ value: Vue.unref(chatStore).unReadCount,
49
+ max: 10
50
+ }, {
51
+ default: Vue.withCtx(() => [
52
+ Vue.createVNode(IconButton.default, {
53
+ title: Vue.unref(t)("Vote"),
54
+ "is-active": Vue.unref(sidebarName) === "vote",
55
+ onClickIcon: toggleChatSidebar
56
+ }, {
57
+ default: Vue.withCtx(() => [
58
+ Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconChat), { size: "24" })
59
+ ]),
60
+ _: 1
61
+ }, 8, ["title", "is-active"])
62
+ ]),
63
+ _: 1
64
+ }, 8, ["hidden", "value"]),
65
+ _cache[0] || (_cache[0] = Vue.createElementVNode("img", {
66
+ class: "ndsc-img-box",
67
+ src: voteIcon.default,
68
+ alt: "",
69
+ click: "toggleChatSidebar"
70
+ }, null, -1))
71
+ ])) : Vue.createCommentVNode("", true);
63
72
  };
64
73
  }
65
74
  });
@@ -1,55 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const Vue = require("vue");
4
- const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
5
- const IconButton = require("../../common/base/IconButton.vue.js");
6
- const useMoreControlHooks = require("./useMoreControlHooks.js");
7
- require("../../../services/main.js");
8
- const roomService = require("../../../services/roomService.js");
9
- require("../../../locales/index.js");
10
- require("@tencentcloud/tuiroom-engine-js");
11
- require("../../../utils/environment.js");
12
- require("mitt");
13
- require("../../../services/manager/roomActionManager.js");
14
- require("@tencentcloud/tui-core");
15
- const _hoisted_1 = {
16
- key: 0,
17
- class: "more-control-container"
18
- };
19
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
20
- __name: "MoreControlPC",
21
- emits: ["on-vote"],
22
- setup(__props, { emit: __emit }) {
23
- const moreControlConfig = roomService.roomService.getComponentConfig("MoreControl");
24
- const { t, basicStore, sidebarName } = useMoreControlHooks.default();
25
- const emit = __emit;
26
- function toggleMoreSidebar() {
27
- if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
28
- basicStore.setSidebarOpenStatus(false);
29
- basicStore.setSidebarName("");
30
- return;
31
- }
32
- basicStore.setSidebarOpenStatus(true);
33
- basicStore.setSidebarName("vote");
34
- emit("on-vote", {
35
- name: "onVote",
36
- visible: basicStore.isSidebarOpen
37
- });
38
- }
39
- return (_ctx, _cache) => {
40
- return Vue.unref(moreControlConfig).visible ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
41
- Vue.createVNode(IconButton.default, {
42
- "is-active": Vue.unref(sidebarName) === "vote",
43
- title: Vue.unref(t)("Vote"),
44
- onClickIcon: toggleMoreSidebar
45
- }, {
46
- default: Vue.withCtx(() => [
47
- Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconMore), { size: "24" })
48
- ]),
49
- _: 1
50
- }, 8, ["is-active", "title"])
51
- ])) : Vue.createCommentVNode("", true);
52
- };
53
- }
54
- });
55
- exports.default = _sfc_main;
3
+ const MoreControlPC_vue_vue_type_script_setup_true_lang = require("./MoreControlPC.vue2.js");
4
+ ;/* empty css */
5
+ const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
6
+ const MoreControlPc = /* @__PURE__ */ _pluginVue_exportHelper.default(MoreControlPC_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-50420946"]]);
7
+ exports.default = MoreControlPc;
@@ -1,4 +1,62 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const MoreControlPC_vue_vue_type_script_setup_true_lang = require("./MoreControlPC.vue.js");
4
- exports.default = MoreControlPC_vue_vue_type_script_setup_true_lang.default;
3
+ const Vue = require("vue");
4
+ const voteIcon = require("../../../assets/imgs/vote-icon.png.js");
5
+ const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
6
+ const IconButton = require("../../common/base/IconButton.vue.js");
7
+ const useMoreControlHooks = require("./useMoreControlHooks.js");
8
+ require("../../../services/main.js");
9
+ const roomService = require("../../../services/roomService.js");
10
+ require("../../../locales/index.js");
11
+ require("@tencentcloud/tuiroom-engine-js");
12
+ require("../../../utils/environment.js");
13
+ require("mitt");
14
+ require("../../../services/manager/roomActionManager.js");
15
+ require("@tencentcloud/tui-core");
16
+ const _hoisted_1 = {
17
+ key: 0,
18
+ class: "more-control-container"
19
+ };
20
+ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
21
+ __name: "MoreControlPC",
22
+ emits: ["on-vote"],
23
+ setup(__props, { emit: __emit }) {
24
+ const moreControlConfig = roomService.roomService.getComponentConfig("MoreControl");
25
+ const { t, basicStore, sidebarName } = useMoreControlHooks.default();
26
+ const emit = __emit;
27
+ function toggleMoreSidebar() {
28
+ if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
29
+ basicStore.setSidebarOpenStatus(false);
30
+ basicStore.setSidebarName("");
31
+ return;
32
+ }
33
+ basicStore.setSidebarOpenStatus(true);
34
+ basicStore.setSidebarName("vote");
35
+ emit("on-vote", {
36
+ name: "onVote",
37
+ visible: basicStore.isSidebarOpen
38
+ });
39
+ }
40
+ return (_ctx, _cache) => {
41
+ return Vue.unref(moreControlConfig).visible ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
42
+ Vue.createVNode(IconButton.default, {
43
+ "is-active": Vue.unref(sidebarName) === "vote",
44
+ title: Vue.unref(t)("Vote"),
45
+ onClickIcon: toggleMoreSidebar
46
+ }, {
47
+ default: Vue.withCtx(() => [
48
+ Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconMore), { size: "24" })
49
+ ]),
50
+ _: 1
51
+ }, 8, ["is-active", "title"]),
52
+ _cache[0] || (_cache[0] = Vue.createElementVNode("img", {
53
+ class: "ndsc-img-box",
54
+ src: voteIcon.default,
55
+ alt: "",
56
+ click: "toggleMoreSidebar"
57
+ }, null, -1))
58
+ ])) : Vue.createCommentVNode("", true);
59
+ };
60
+ }
61
+ });
62
+ exports.default = _sfc_main;
@@ -1,10 +1,4 @@
1
- declare const MoreControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- "on-vote": (...args: any[]) => void;
4
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
5
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
6
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
7
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1
+ declare const MoreControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
2
  "on-vote": (...args: any[]) => void;
9
3
  }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
10
4
  "onOn-vote"?: ((...args: any[]) => any) | undefined;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const MoreControlH5 = require("./MoreControlH5.vue.js");
4
- const MoreControlPC_vue_vue_type_script_setup_true_lang = require("./MoreControlPC.vue.js");
4
+ const MoreControlPC = require("./MoreControlPC.vue.js");
5
5
  const environment = require("../../../utils/environment.js");
6
- const MoreControl = environment.isMobile ? MoreControlH5.default : MoreControlPC_vue_vue_type_script_setup_true_lang.default;
6
+ const MoreControl = environment.isMobile ? MoreControlH5.default : MoreControlPC.default;
7
7
  exports.default = MoreControl;
@@ -1,10 +1,8 @@
1
1
  declare const Index: ({
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
3
3
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
4
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
5
4
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
5
  "show-overlay": (...args: any[]) => void;
7
- "on-vote": (...args: any[]) => void;
8
6
  }, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
9
7
  P: {};
10
8
  B: {};
@@ -14,20 +12,17 @@ declare const Index: ({
14
12
  Defaults: {};
15
13
  }, Readonly<{}> & Readonly<{
16
14
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
17
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
18
15
  }>, {}, {}, {}, {}, {}>;
19
16
  __isFragment?: never;
20
17
  __isTeleport?: never;
21
18
  __isSuspense?: never;
22
19
  } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{
23
20
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
24
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
25
21
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
22
  "show-overlay": (...args: any[]) => void;
27
- "on-vote": (...args: any[]) => void;
28
23
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
29
24
  $slots: {
30
- content?(_: {}): any;
25
+ contentH5?(_: {}): any;
31
26
  };
32
27
  })) | ({
33
28
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
@@ -1,12 +1,10 @@
1
1
  declare function __VLS_template(): {
2
- content?(_: {}): any;
2
+ contentH5?(_: {}): any;
3
3
  };
4
4
  declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
5
  "show-overlay": (...args: any[]) => void;
6
- "on-vote": (...args: any[]) => void;
7
6
  }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
8
7
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
9
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
10
8
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
9
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
12
10
  export default _default;
@@ -3,5 +3,5 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const indexH5_vue_vue_type_script_setup_true_lang = ;/* empty css */
4
4
  ;/* empty css */
5
5
  const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
6
- const indexH5 = /* @__PURE__ */ _pluginVue_exportHelper.default(indexH5_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-ee2c0715"]]);
6
+ const indexH5 = /* @__PURE__ */ _pluginVue_exportHelper.default(indexH5_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-253a50f0"]]);
7
7
  exports.default = indexH5;
@@ -57,21 +57,17 @@ const ManageMemberControl_vue_vue_type_script_setup_true_lang = require("../Mana
57
57
  const ChatControl_vue_vue_type_script_setup_true_lang = require("../ChatControl.vue.js");
58
58
  const ManageStageControl_vue_vue_type_script_setup_true_lang = require("../ManageStageControl.vue.js");
59
59
  const MemberApplyControl = require("../ApplyControl/MemberApplyControl.vue.js");
60
- const index$2 = require("../MoreControl/index.js");
61
- const index$1 = require("../VoteControl/index.js");
60
+ const index$1 = require("../MoreControl/index.js");
62
61
  const AIControl = require("../AIControl.vue.js");
63
62
  const useMitt = require("../../../hooks/useMitt.js");
64
63
  const useRoomFooterHooks = require("./useRoomFooterHooks.js");
65
64
  const _hoisted_1 = { class: "footer-container" };
66
65
  const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
67
66
  __name: "indexH5",
68
- emits: ["show-overlay", "on-vote"],
67
+ emits: ["show-overlay"],
69
68
  setup(__props, { emit: __emit }) {
70
69
  const { roomStore, isMaster, isAdmin, isAudience } = useRoomFooterHooks.default();
71
70
  const emit = __emit;
72
- const onVote = (data) => {
73
- emit("on-vote", { code: data.visible, message: "vote" });
74
- };
75
71
  function handleControlClick(name) {
76
72
  useMitt.default.emit("experience-communication", name);
77
73
  }
@@ -95,17 +91,7 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
95
91
  !Vue.unref(roomStore).isSpeakAfterTakingSeatMode ? Vue.withDirectives((Vue.openBlock(), Vue.createBlock(ChatControl_vue_vue_type_script_setup_true_lang.default, { key: 2 }, null, 512)), [
96
92
  [Vue.unref(vTap.default), () => handleControlClick("chatControl")]
97
93
  ]) : Vue.createCommentVNode("", true),
98
- Vue.withDirectives((Vue.openBlock(), Vue.createBlock(Vue.unref(index$1.default), {
99
- onShowOverlay: handleShowOverlay,
100
- onOnVote: onVote
101
- }, {
102
- content: Vue.withCtx(() => [
103
- Vue.renderSlot(_ctx.$slots, "content", {}, void 0, true)
104
- ]),
105
- _: 3
106
- })), [
107
- [Vue.unref(vTap.default), () => handleControlClick("voteControl")]
108
- ]),
94
+ Vue.renderSlot(_ctx.$slots, "contentH5", {}, void 0, true),
109
95
  Vue.createVNode(AIControl.default, {
110
96
  onClick: _cache[0] || (_cache[0] = ($event) => handleControlClick("AIControl"))
111
97
  }),
@@ -118,7 +104,7 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
118
104
  Vue.withDirectives(Vue.createVNode(ManageMemberControl_vue_vue_type_script_setup_true_lang.default, null, null, 512), [
119
105
  [Vue.unref(vTap.default), () => handleControlClick("manageMemberControl")]
120
106
  ]),
121
- Vue.withDirectives(Vue.createVNode(Vue.unref(index$2.default), { onShowOverlay: handleShowOverlay }, null, 512), [
107
+ Vue.withDirectives(Vue.createVNode(Vue.unref(index$1.default), { onShowOverlay: handleShowOverlay }, null, 512), [
122
108
  [Vue.unref(vTap.default), () => handleControlClick("moreControl")]
123
109
  ])
124
110
  ]);
package/lib/index.js CHANGED
@@ -3635,44 +3635,6 @@ to {
3635
3635
  border-radius: 8px;
3636
3636
  color: var(--text-color-primary);
3637
3637
  background-color: var(--button-color-secondary-default);
3638
- }.show-more-content[data-v-b8ad5a8b] {
3639
- position: absolute;
3640
- bottom: 15px;
3641
- left: 5%;
3642
- width: 90%;
3643
- height: 17vh;
3644
- padding: 10px;
3645
- border-radius: 13px;
3646
- animation-name: popup-b8ad5a8b;
3647
- animation-duration: 200ms;
3648
- background-color: var(--bg-color-operate);
3649
- }
3650
- @keyframes popup-b8ad5a8b {
3651
- from {
3652
- bottom: 0;
3653
- }
3654
- to {
3655
- bottom: 15px;
3656
- }
3657
- }
3658
- .control-compent[data-v-b8ad5a8b] {
3659
- display: flex;
3660
- }
3661
- .close[data-v-b8ad5a8b] {
3662
- position: relative;
3663
- top: 10%;
3664
- display: flex;
3665
- align-items: center;
3666
- justify-content: center;
3667
- width: 100%;
3668
- padding: 10px;
3669
- font-style: normal;
3670
- font-weight: 400;
3671
- line-height: 24px;
3672
- text-align: center;
3673
- border-radius: 8px;
3674
- color: var(--text-color-primary);
3675
- background-color: var(--button-color-secondary-default);
3676
3638
  }.tool-box[data-v-34681937] {
3677
3639
  position: absolute;
3678
3640
  bottom: 72px;
@@ -3702,7 +3664,7 @@ to {
3702
3664
  .tool-box .tool-box-item[data-v-34681937]:hover {
3703
3665
  border-radius: 8px;
3704
3666
  background-color: var(--list-color-hover);
3705
- }.footer-container[data-v-ee2c0715] {
3667
+ }.footer-container[data-v-253a50f0] {
3706
3668
  position: absolute;
3707
3669
  bottom: 0;
3708
3670
  display: flex;
@@ -3966,6 +3928,12 @@ to {
3966
3928
  }
3967
3929
  .footer .mirror-container .mirror-text[data-v-21a63691] {
3968
3930
  margin-left: 4px;
3931
+ }.ndsc-img-box[data-v-70cfb5f8] {
3932
+ width: 50px;
3933
+ height: 50px;
3934
+ }.ndsc-img-box[data-v-50420946] {
3935
+ width: 50px;
3936
+ height: 50px;
3969
3937
  }.footer-container[data-v-4afcea78] {
3970
3938
  position: absolute;
3971
3939
  bottom: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndscnj/roomkit-web-vue3",
3
- "version": "25.12.24159",
3
+ "version": "25.12.24162",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.mjs",
6
6
  "types": "./es/index.d.ts",
@@ -1,90 +1,53 @@
1
1
  <template>
2
- <div>
3
- <div v-if="voteControlConfig.visible" class="more-control-container">
2
+ <div v-if="chatControlConfig.visible" class="vote-control-container">
3
+ <tui-badge
4
+ :hidden="chatStore.unReadCount === 0"
5
+ :value="chatStore.unReadCount"
6
+ :max="10"
7
+ >
4
8
  <icon-button
5
- v-tap="showMore"
6
- :is-active="sidebarName === 'vote'"
7
9
  :title="t('Vote')"
10
+ :is-active="sidebarName === 'vote'"
11
+ @click-icon="toggleChatSidebar"
8
12
  >
9
- <IconExtension size="24" />
13
+ <IconChat size="24" />
10
14
  </icon-button>
11
- </div>
15
+ </tui-badge>
16
+ <img class="ndsc-img-box" src="../../../assets/imgs/vote-icon.png" alt="" click="toggleChatSidebar"/>
12
17
  </div>
13
18
  </template>
19
+
14
20
  <script setup lang="ts">
15
- import { ref, onMounted, onUnmounted, defineEmits } from 'vue';
16
- import { IconExtension } from '@tencentcloud/uikit-base-component-vue3';
17
21
  import IconButton from '../../common/base/IconButton.vue';
18
- import userMoreControl from './useMoreControlHooks';
19
- import { roomService } from '../../../services';
20
- const voteControlConfig = roomService.getComponentConfig('MoreControl');
21
- const showMoreContent = ref(false);
22
- const moreContentRef = ref();
23
- const { t, sidebarName,basicStore } = userMoreControl();
24
- const emit = defineEmits(['show-overlay','on-vote']);
25
- function showMore() {
26
- showMoreContent.value = true;
27
- emit('on-vote', {
28
- name: 'onVote',
29
- visible:basicStore.isSidebarOpen,
30
- });
31
- }
32
- function handleDocumentClick(event: MouseEvent) {
33
- if (showMoreContent.value && !moreContentRef.value.contains(event.target)) {
34
- showMoreContent.value = false;
22
+ import { IconChat } from '@tencentcloud/uikit-base-component-vue3';
23
+ import { useBasicStore } from '../../../stores/basic';
24
+ import { useChatStore } from '../../../stores/chat';
25
+ import { storeToRefs } from 'pinia';
26
+ import { useI18n } from '../../../locales';
27
+ import TuiBadge from '../../common/base/Badge.vue';
28
+ import { roomService, MetricsKey } from '../../../services';
29
+ const { t } = useI18n();
30
+ const chatControlConfig = roomService.getComponentConfig('MoreControl');
31
+ const basicStore = useBasicStore();
32
+ const chatStore = useChatStore();
33
+ const { sidebarName } = storeToRefs(basicStore);
34
+
35
+ async function toggleChatSidebar() {
36
+ if (basicStore.isSidebarOpen && basicStore.sidebarName === 'vote') {
37
+ basicStore.setSidebarOpenStatus(false);
38
+ basicStore.setSidebarName('');
39
+ return;
35
40
  }
41
+ basicStore.setSidebarOpenStatus(true);
42
+ basicStore.setSidebarName('vote');
43
+ chatStore.updateUnReadCount(0);
44
+ roomService.dataReportManager.reportCount(MetricsKey.openChat);
45
+ roomService.trackingManager.sendMessage('experience-vote');
36
46
  }
37
-
38
- onMounted(() => {
39
- document?.addEventListener('click', handleDocumentClick, true);
40
- });
41
-
42
- onUnmounted(() => {
43
- document?.removeEventListener('click', handleDocumentClick, true);
44
- });
45
47
  </script>
46
48
  <style lang="scss" scoped>
47
- .show-more-content {
48
- position: absolute;
49
- bottom: 15px;
50
- left: 5%;
51
- width: 90%;
52
- height: 17vh;
53
- padding: 10px;
54
- border-radius: 13px;
55
- animation-name: popup;
56
- animation-duration: 200ms;
57
- background-color: var(--bg-color-operate);
58
- }
59
-
60
- @keyframes popup {
61
- from {
62
- bottom: 0;
63
- }
64
-
65
- to {
66
- bottom: 15px;
67
- }
68
- }
69
-
70
- .control-compent {
71
- display: flex;
72
- }
73
-
74
- .close {
75
- position: relative;
76
- top: 10%;
77
- display: flex;
78
- align-items: center;
79
- justify-content: center;
80
- width: 100%;
81
- padding: 10px;
82
- font-style: normal;
83
- font-weight: 400;
84
- line-height: 24px;
85
- text-align: center;
86
- border-radius: 8px;
87
- color: var(--text-color-primary);
88
- background-color: var(--button-color-secondary-default);
49
+ .ndsc-img-box{
50
+ width: 50px;
51
+ height: 50px
89
52
  }
90
53
  </style>
@@ -7,6 +7,7 @@
7
7
  >
8
8
  <IconMore size="24" />
9
9
  </icon-button>
10
+ <img class="ndsc-img-box" src="../../../assets/imgs/vote-icon.png" alt="" click="toggleMoreSidebar"/>
10
11
  </div>
11
12
  </template>
12
13
  <script setup lang="ts">
@@ -32,4 +33,9 @@ function toggleMoreSidebar() {
32
33
  });
33
34
  }
34
35
  </script>
35
- <style lang="scss" scoped></style>
36
+ <style lang="scss" scoped>
37
+ .ndsc-img-box{
38
+ width: 50px;
39
+ height: 50px
40
+ }
41
+ </style>
@@ -14,15 +14,7 @@
14
14
  v-if="!roomStore.isSpeakAfterTakingSeatMode"
15
15
  v-tap="() => handleControlClick('chatControl')"
16
16
  />
17
- <vote-control
18
- v-tap="() => handleControlClick('voteControl')"
19
- @show-overlay="handleShowOverlay"
20
- @on-vote="onVote"
21
- >
22
- <template #content>
23
- <slot name="content"></slot>
24
- </template>
25
- </vote-control>
17
+ <slot name="contentH5"></slot>
26
18
  <AIControl
27
19
  @click="handleControlClick('AIControl')"
28
20
  />
@@ -55,7 +47,7 @@ import ChatControl from '../ChatControl.vue';
55
47
  import MasterApplyControl from '../ManageStageControl.vue';
56
48
  import MemberApplyControl from '../ApplyControl/MemberApplyControl.vue';
57
49
  import MoreControl from '../MoreControl/index';
58
- import VoteControl from '../VoteControl/index';
50
+ import VoteControl from '../VoteControl/index.ts';
59
51
  import AIControl from '../AIControl.vue';
60
52
  import bus from '../../../hooks/useMitt';
61
53
  import vTap from '../../../directives/vTap';
@@ -64,10 +56,7 @@ import useRoomFooter from './useRoomFooterHooks';
64
56
 
65
57
  const { roomStore, isMaster, isAdmin, isAudience } = useRoomFooter();
66
58
 
67
- const emit = defineEmits(['show-overlay','on-vote']);
68
- const onVote = (data: { name: string; visible: boolean }) => {
69
- emit('on-vote', { code: data.visible, message: 'vote' });
70
- };
59
+ const emit = defineEmits(['show-overlay']);
71
60
  function handleControlClick(name: string) {
72
61
  bus.emit('experience-communication', name);
73
62
  }