UNPKG

@tencentcloud/roomkit-electron-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,

138 lines (137 loc) 5.86 kB
import { defineComponent, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createTextVNode } from "vue"; import ApplyStageLabelIcon from "../../../common/icons/ApplyStageLabelIcon.vue.mjs"; import useMasterApplyControl from "../../../../hooks/useMasterApplyControl.mjs"; import TuiAvatar from "../../../common/Avatar.vue.mjs"; import Dialog from "../../../common/base/Dialog/index.vue.mjs"; import SvgIcon from "../../../common/base/SvgIcon.vue.mjs"; import TuiButton from "../../../common/base/Button.vue.mjs"; import "../../../../services/main.mjs"; import { roomService } from "../../../../services/roomService.mjs"; import "../../../../locales/index.mjs"; import "@tencentcloud/tuiroom-engine-electron"; import "../../../../utils/environment.mjs"; import "mitt"; import "../../../../services/manager/roomActionManager.mjs"; import "@tencentcloud/tui-core"; const _hoisted_1 = { key: 0, class: "apply-list" }; const _hoisted_2 = { class: "apply-list-title" }; const _hoisted_3 = { class: "apply-list-name" }; const _hoisted_4 = { class: "apply-list-operate" }; const _hoisted_5 = { class: "user-info" }; const _hoisted_6 = ["title"]; const _hoisted_7 = { class: "control-container" }; const _hoisted_8 = { key: 1, class: "apply-nobody" }; const _hoisted_9 = { class: "apply-text" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index", setup(__props) { const { t, showApplyUserList, hideApplyList, applyToAnchorUserCount, applyToAnchorList, handleAllUserApply, handleUserApply } = useMasterApplyControl(); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", null, [ createVNode(Dialog, { modelValue: unref(showApplyUserList), "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(showApplyUserList) ? showApplyUserList.value = $event : null), title: unref(t)("Member Onstage Application"), modal: true, "show-close": true, "close-on-click-modal": true, "before-close": unref(hideApplyList), width: "500px", "append-to-room-container": true }, { footer: withCtx(() => [ createVNode(TuiButton, { size: "default", disabled: unref(applyToAnchorUserCount) === 0, onClick: _cache[0] || (_cache[0] = ($event) => unref(handleAllUserApply)(true)) }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("Agree All")), 1) ]), _: 1 }, 8, ["disabled"]), createVNode(TuiButton, { class: "cancel-button", size: "default", disabled: unref(applyToAnchorUserCount) === 0, onClick: _cache[1] || (_cache[1] = ($event) => unref(handleAllUserApply)(false)) }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("Reject All")), 1) ]), _: 1 }, 8, ["disabled"]) ]), default: withCtx(() => [ unref(applyToAnchorUserCount) ? (openBlock(), createElementBlock("div", _hoisted_1, [ createElementVNode("div", _hoisted_2, [ createElementVNode("span", _hoisted_3, toDisplayString(unref(t)("Members")), 1), createElementVNode("span", _hoisted_4, toDisplayString(unref(t)("Operate")), 1) ]), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(applyToAnchorList), (item) => { return openBlock(), createElementBlock("div", { key: item.userId, class: "apply-item" }, [ createElementVNode("div", _hoisted_5, [ createVNode(TuiAvatar, { class: "avatar-url", "img-src": item.avatarUrl }, null, 8, ["img-src"]), createElementVNode("span", { class: "user-name", title: unref(roomService).getDisplayName(item) }, toDisplayString(unref(roomService).getDisplayName(item)), 9, _hoisted_6) ]), createElementVNode("div", _hoisted_7, [ createVNode(TuiButton, { size: "default", class: "agree", onClick: ($event) => unref(handleUserApply)(item.userId, true) }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("Agree to the stage")), 1) ]), _: 2 }, 1032, ["onClick"]), createVNode(TuiButton, { size: "default", class: "reject", onClick: ($event) => unref(handleUserApply)(item.userId, false) }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("Reject")), 1) ]), _: 2 }, 1032, ["onClick"]) ]) ]); }), 128)) ])) : (openBlock(), createElementBlock("div", _hoisted_8, [ createVNode(SvgIcon, { icon: ApplyStageLabelIcon }), createElementVNode("span", _hoisted_9, toDisplayString(unref(t)("Currently no member has applied to go on stage")), 1) ])) ]), _: 1 }, 8, ["modelValue", "title", "before-close"]) ]); }; } }); export { _sfc_main as default };