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,

72 lines (71 loc) 3.03 kB
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createCommentVNode, createElementVNode, toDisplayString, createVNode } from "vue"; import { IconCopy } from "@tencentcloud/uikit-base-component-vue3"; import useRoomInfo from "../RoomHeader/RoomInfo/useRoomInfoHooks.mjs"; import { isMobile } from "../../utils/environment.mjs"; import { TUIConferenceStatus } from "@tencentcloud/tuiroom-engine-js"; import { useI18n } from "../../locales/index.mjs"; const _hoisted_1 = { class: "detail-title" }; const _hoisted_2 = { class: "detail-info" }; const _hoisted_3 = ["title"]; const _hoisted_4 = ["onClick"]; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "ConferenceDetail", props: { conferenceInfo: {}, scheduleRoomDetailList: {} }, setup(__props) { const { t } = useI18n(); const statusMap = { [TUIConferenceStatus.kConferenceStatusRunning]: { text: "Ongoing", className: "status-running" } }; const props = __props; const { onCopy } = useRoomInfo(); const getStatusTextAndClass = (status) => { if (!status) return { text: "", className: "" }; return statusMap[status] || { text: "", className: "" }; }; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(["detail-container", unref(isMobile) ? "h5" : ""]) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(props.scheduleRoomDetailList, (item, index) => { return openBlock(), createElementBlock(Fragment, null, [ item.isVisible ? (openBlock(), createElementBlock("div", { class: normalizeClass(["detail-content"]), key: index }, [ createElementVNode("span", _hoisted_1, toDisplayString(unref(t)(item.title)), 1), createElementVNode("span", _hoisted_2, [ createElementVNode("span", { class: "detail-item", title: item.content }, toDisplayString(item.content), 9, _hoisted_3), item.isShowCopyIcon ? (openBlock(), createElementBlock("span", { key: 0, class: "copy-container", onClick: ($event) => unref(onCopy)(item.content) }, [ createVNode(unref(IconCopy)) ], 8, _hoisted_4)) : createCommentVNode("", true), item.isShowStatus ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([ "detail-status", getStatusTextAndClass(item.status).className ]) }, toDisplayString(unref(t)(getStatusTextAndClass(item.status).text)), 3)) : createCommentVNode("", true) ]) ])) : createCommentVNode("", true) ], 64); }), 256)) ], 2); }; } }); export { _sfc_main as default };