UNPKG

@tencentcloud/roomkit-web-vue3

Version:

<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,

69 lines (68 loc) 2.38 kB
import { defineComponent, ref, createElementBlock, openBlock, createVNode, createCommentVNode, unref, withCtx } from "vue"; import { IconMore } from "@tencentcloud/uikit-base-component-vue3"; import IconButton from "../common/base/IconButton.vue.mjs"; import { useBasicStore } from "../../stores/basic.mjs"; import { storeToRefs } from "pinia"; import { useI18n } from "../../locales/index.mjs"; import { isMobile } from "../../utils/environment.mjs"; import Index from "../RoomMore/index.mjs"; const _hoisted_1 = { class: "more-control-container" }; const _hoisted_2 = { key: 0, class: "contact-container" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "ContactControl", setup(__props) { const basicStore = useBasicStore(); const { sidebarName } = storeToRefs(basicStore); const { t } = useI18n(); const isShowContactTab = ref(false); const contactRef = ref(); function toggleContactSidebar() { if (!isMobile) { if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "more") { basicStore.setSidebarOpenStatus(false); basicStore.setSidebarName(""); return; } basicStore.setSidebarOpenStatus(true); basicStore.setSidebarName("more"); } else { isShowContactTab.value = true; if (basicStore.sidebarName === "more") { basicStore.setSidebarName(""); return; } basicStore.setSidebarName("more"); } } function handleOnCloseContact() { isShowContactTab.value = false; } return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1, [ createVNode(IconButton, { "is-active": unref(sidebarName) === "more", title: unref(t)("Contact us"), onClickIcon: toggleContactSidebar }, { default: withCtx(() => [ createVNode(unref(IconMore), { size: "24" }) ]), _: 1 }, 8, ["is-active", "title"]), isShowContactTab.value ? (openBlock(), createElementBlock("div", _hoisted_2, [ createVNode(unref(Index), { ref_key: "contactRef", ref: contactRef, onOnCloseContact: handleOnCloseContact }, null, 512) ])) : createCommentVNode("", true) ]); }; } }); export { _sfc_main as default };