UNPKG

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,

96 lines (95 loc) 4.3 kB
import { defineComponent, openBlock, createElementBlock, unref, Fragment, renderList, createElementVNode, createVNode, toDisplayString, normalizeClass } from "vue"; import TuiAvatar from "../../../common/Avatar.vue2.mjs"; import ApplyStageLabelIcon from "../../../common/icons/ApplyStageLabelIcon.vue.mjs"; import useMasterApplyControl from "../../../../hooks/useMasterApplyControl.mjs"; import SvgIcon from "../../../common/base/SvgIcon.vue.mjs"; import "../../../../services/main.mjs"; import { roomService } from "../../../../services/roomService.mjs"; import "../../../../locales/index.mjs"; import "@tencentcloud/tuiroom-engine-js"; import "../../../../utils/environment.mjs"; import "mitt"; import "../../../../services/manager/roomActionManager.mjs"; import "@tencentcloud/tui-core"; const _hoisted_1 = { class: "apply-control-container" }; const _hoisted_2 = { key: 0, class: "apply-list-mobile" }; const _hoisted_3 = { class: "user-info" }; const _hoisted_4 = { class: "stage-info" }; const _hoisted_5 = ["title"]; const _hoisted_6 = { class: "apply-tip" }; const _hoisted_7 = { class: "control-container" }; const _hoisted_8 = ["onClick"]; const _hoisted_9 = ["onClick"]; const _hoisted_10 = { key: 1, class: "apply-control-nobody" }; const _hoisted_11 = { class: "apply-text" }; const _hoisted_12 = { class: "apply-list-footer" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "MasterApplyControlH5", setup(__props) { const { t, applyToAnchorList, handleAllUserApply, handleUserApply, applyToAnchorUserCount } = useMasterApplyControl(); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1, [ unref(applyToAnchorUserCount) ? (openBlock(), createElementBlock("div", _hoisted_2, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(applyToAnchorList), (item) => { return openBlock(), createElementBlock("div", { key: item.userId, class: "apply-item" }, [ createElementVNode("div", _hoisted_3, [ createVNode(TuiAvatar, { class: "avatar-url", "img-src": item.avatarUrl }, null, 8, ["img-src"]), createElementVNode("div", _hoisted_4, [ createElementVNode("span", { class: "user-name", title: unref(roomService).getDisplayName(item) }, toDisplayString(unref(roomService).getDisplayName(item)), 9, _hoisted_5), createElementVNode("span", _hoisted_6, toDisplayString(unref(t)("Apply for the stage")), 1) ]) ]), createElementVNode("div", _hoisted_7, [ createElementVNode("div", { class: "reject-button", onClick: ($event) => unref(handleUserApply)(item.userId, false) }, toDisplayString(unref(t)("Reject")), 9, _hoisted_8), createElementVNode("div", { class: "agree-button", onClick: ($event) => unref(handleUserApply)(item.userId, true) }, toDisplayString(unref(t)("Agree")), 9, _hoisted_9) ]) ]); }), 128)) ])) : (openBlock(), createElementBlock("div", _hoisted_10, [ createVNode(SvgIcon, { icon: ApplyStageLabelIcon }), createElementVNode("span", _hoisted_11, toDisplayString(unref(t)("Currently no member has applied to go on stage")), 1) ])), createElementVNode("div", _hoisted_12, [ createElementVNode("div", { class: normalizeClass(["action-button", { disabled: unref(applyToAnchorUserCount) === 0 }]), onClick: _cache[0] || (_cache[0] = ($event) => unref(handleAllUserApply)(false)) }, toDisplayString(unref(t)("Reject All")), 3), createElementVNode("div", { class: normalizeClass(["action-button agree", { disabled: unref(applyToAnchorUserCount) === 0 }]), onClick: _cache[1] || (_cache[1] = ($event) => unref(handleAllUserApply)(true)) }, toDisplayString(unref(t)("Agree All")), 3) ]) ]); }; } }); export { _sfc_main as default };