@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,
137 lines (136 loc) • 6.29 kB
JavaScript
"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
const useMasterApplyControl = require("../../../../hooks/useMasterApplyControl.js");
const Avatar = require("../../../common/Avatar.vue2.js");
const index = require("../../../common/base/Dialog/index.js");
require("../../../../services/main.js");
const roomService = require("../../../../services/roomService.js");
require("../../../../locales/index.js");
require("@tencentcloud/tuiroom-engine-js");
require("../../../../utils/environment.js");
require("mitt");
require("../../../../services/manager/roomActionManager.js");
require("@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__ */ Vue.defineComponent({
__name: "MasterApplyControlPC",
setup(__props) {
const {
t,
showApplyUserList,
hideApplyList,
applyToAnchorUserCount,
applyToAnchorList,
handleAllUserApply,
handleUserApply
} = useMasterApplyControl.default();
return (_ctx, _cache) => {
return Vue.openBlock(), Vue.createElementBlock("div", null, [
Vue.createVNode(Vue.unref(index.default), {
modelValue: Vue.unref(showApplyUserList),
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => Vue.isRef(showApplyUserList) ? showApplyUserList.value = $event : null),
title: Vue.unref(t)("Member Onstage Application"),
modal: true,
"show-close": true,
"close-on-click-modal": true,
"before-close": Vue.unref(hideApplyList),
width: "500px",
"append-to-room-container": true
}, {
footer: Vue.withCtx(() => [
Vue.createVNode(Vue.unref(uikitBaseComponentVue3.TUIButton), {
disabled: Vue.unref(applyToAnchorUserCount) === 0,
onClick: _cache[0] || (_cache[0] = ($event) => Vue.unref(handleAllUserApply)(true)),
type: "primary",
style: { "min-width": "88px" }
}, {
default: Vue.withCtx(() => [
Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("Agree All")), 1)
]),
_: 1
}, 8, ["disabled"]),
Vue.createVNode(Vue.unref(uikitBaseComponentVue3.TUIButton), {
disabled: Vue.unref(applyToAnchorUserCount) === 0,
onClick: _cache[1] || (_cache[1] = ($event) => Vue.unref(handleAllUserApply)(false)),
type: "primary",
style: { "min-width": "88px" }
}, {
default: Vue.withCtx(() => [
Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("Reject All")), 1)
]),
_: 1
}, 8, ["disabled"])
]),
default: Vue.withCtx(() => [
Vue.unref(applyToAnchorUserCount) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
Vue.createElementVNode("div", _hoisted_2, [
Vue.createElementVNode("span", _hoisted_3, Vue.toDisplayString(Vue.unref(t)("Members")), 1),
Vue.createElementVNode("span", _hoisted_4, Vue.toDisplayString(Vue.unref(t)("Operate")), 1)
]),
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(applyToAnchorList), (item) => {
return Vue.openBlock(), Vue.createElementBlock("div", {
key: item.userId,
class: "apply-item"
}, [
Vue.createElementVNode("div", _hoisted_5, [
Vue.createVNode(Avatar.default, {
class: "avatar-url",
"img-src": item.avatarUrl
}, null, 8, ["img-src"]),
Vue.createElementVNode("span", {
class: "user-name",
title: Vue.unref(roomService.roomService).getDisplayName(item)
}, Vue.toDisplayString(Vue.unref(roomService.roomService).getDisplayName(item)), 9, _hoisted_6)
]),
Vue.createElementVNode("div", _hoisted_7, [
Vue.createVNode(Vue.unref(uikitBaseComponentVue3.TUIButton), {
onClick: ($event) => Vue.unref(handleUserApply)(item.userId, true),
type: "primary",
style: { "min-width": "88px" }
}, {
default: Vue.withCtx(() => [
Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("Agree to the stage")), 1)
]),
_: 2
}, 1032, ["onClick"]),
Vue.createVNode(Vue.unref(uikitBaseComponentVue3.TUIButton), {
onClick: ($event) => Vue.unref(handleUserApply)(item.userId, false),
type: "primary",
style: { "min-width": "88px" }
}, {
default: Vue.withCtx(() => [
Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("Reject")), 1)
]),
_: 2
}, 1032, ["onClick"])
])
]);
}), 128))
])) : (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_8, [
Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconApplyStageLabel), { size: "48" }),
Vue.createElementVNode("span", _hoisted_9, Vue.toDisplayString(Vue.unref(t)("Currently no member has applied to go on stage")), 1)
]))
]),
_: 1
}, 8, ["modelValue", "title", "before-close"])
]);
};
}
});
exports.default = _sfc_main;