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,

73 lines (72 loc) 2.76 kB
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createCommentVNode, createElementVNode, createBlock, toDisplayString } from "vue"; import useRoomInfo from "../RoomHeader/RoomInfo/useRoomInfoHooks.mjs"; import { IconCopy } from "@tencentcloud/uikit-base-component-vue3"; import { isWeChat, isMobile } from "../../utils/environment.mjs"; import { useI18n } from "../../locales/index.mjs"; import { getUrlWithRoomId } from "../../utils/utils.mjs"; const _hoisted_1 = { class: "invite-member-title" }; const _hoisted_2 = ["title"]; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "InvitePanel", props: { scheduleInviteList: {}, shareLinkData: {} }, setup(__props) { const { t } = useI18n(); const props = __props; const { onCopy } = useRoomInfo(); const scheduleInviteList = computed(() => { const { roomId, password } = (props == null ? void 0 : props.shareLinkData) || {}; if (!roomId) return props.scheduleInviteList; return [ { title: `${t("Room ID")}`, content: roomId, isShowCopyIcon: true, isVisible: true }, { title: `${t("Room Password")}`, content: password, isShowCopyIcon: true, isVisible: !!password }, { title: `${t("Room Link")}`, content: getUrlWithRoomId(roomId), isShowCopyIcon: true, isVisible: !isWeChat } ]; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(["invite-member", unref(isMobile) ? "h5" : ""]) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(scheduleInviteList.value, (item, index) => { return openBlock(), createElementBlock(Fragment, null, [ item.isVisible ? (openBlock(), createElementBlock("div", { class: "invite-member-container", key: index }, [ createElementVNode("span", _hoisted_1, toDisplayString(unref(t)(item.title)), 1), createElementVNode("span", { class: "invite-member-content", title: item.content }, toDisplayString(item.content), 9, _hoisted_2), item.isShowCopyIcon ? (openBlock(), createBlock(unref(IconCopy), { key: 0, class: "copy", onClick: ($event) => unref(onCopy)(item.content) }, null, 8, ["onClick"])) : createCommentVNode("", true) ])) : createCommentVNode("", true) ], 64); }), 256)) ], 2); }; } }); export { _sfc_main as default };