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,

177 lines (176 loc) 7.97 kB
import { defineComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, unref, normalizeClass, toDisplayString, createVNode, createCommentVNode, createBlock, createTextVNode, withDirectives, vShow, isRef, withCtx } from "vue"; import index from "./MemberItem/index.mjs"; import Dialog from "../common/base/Dialog/index.mjs"; import useIndex from "./useIndexHooks.mjs"; import { storeToRefs } from "pinia"; import { useRoomStore } from "../../stores/room.mjs"; import SvgIcon from "../common/base/SvgIcon.vue.mjs"; import ApplyTipsIcon from "../common/icons/ApplyTipsIcon.vue.mjs"; import { USERS_STATUS } from "../../constants/room.mjs"; const _hoisted_1 = { class: "manage-member-container" }; const _hoisted_2 = { class: "manage-member-header" }; const _hoisted_3 = { class: "apply-count" }; const _hoisted_4 = { class: "user-status" }; const _hoisted_5 = ["onClick"]; const _hoisted_6 = { class: "apply-staged" }; const _hoisted_7 = { key: 0, class: "apply-on-stage-info" }; const _hoisted_8 = { class: "apply-info" }; const _hoisted_9 = { class: "member-list-container" }; const _hoisted_10 = { class: "member-list-container" }; const _hoisted_11 = { key: 0, class: "manage-member-bottom" }; const _hoisted_12 = { class: "more-control-container" }; const _hoisted_13 = { class: "more-control-container-main" }; const _hoisted_14 = ["onTouchstart"]; const _hoisted_15 = { class: "operate-text" }; const _hoisted_16 = { key: 1, class: "global-setting" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "indexH5", setup(__props) { const roomStore = useRoomStore(); const { applyToAnchorList, isMicrophoneDisableForAllUser, isCameraDisableForAllUser, isGeneralUser } = storeToRefs(roomStore); const { audioManageInfo, videoManageInfo, showManageAllUserDialog, dialogTitle, dialogContent, ManageControlType, toggleManageAllMember, doToggleManageAllMember, t, handleToggleStaged, applyToAnchorUserContent, showApplyUserList, showMoreControl, moreControlList, toggleClickMoreBtn, userStatusList, currentActiveTabName, filteredUserStatusList, handleCallAllInvitee } = useIndex(); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1, [ createElementVNode("div", _hoisted_2, [ createElementVNode("div", _hoisted_3, [ createElementVNode("div", _hoisted_4, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(userStatusList), (item, index2) => { return openBlock(), createElementBlock("div", { class: normalizeClass([ "user-status-container", { "apply-count-active": item.status === unref(currentActiveTabName) } ]), key: index2, onClick: ($event) => unref(handleToggleStaged)(item) }, [ createElementVNode("span", _hoisted_6, toDisplayString(item.title), 1) ], 10, _hoisted_5); }), 128)) ]) ]), unref(applyToAnchorList).length > 0 && !unref(isGeneralUser) ? (openBlock(), createElementBlock("div", _hoisted_7, [ createVNode(SvgIcon, { icon: ApplyTipsIcon, class: "apply-icon" }), createElementVNode("div", _hoisted_8, toDisplayString(unref(applyToAnchorUserContent)), 1), createElementVNode("div", { class: "apply-check", onClick: _cache[0] || (_cache[0] = //@ts-ignore (...args) => unref(showApplyUserList) && unref(showApplyUserList)(...args)) }, toDisplayString(unref(t)("Check")), 1) ])) : createCommentVNode("", true) ]), createElementVNode("div", _hoisted_9, [ createElementVNode("div", _hoisted_10, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredUserStatusList), (userInfo) => { return openBlock(), createBlock(unref(index), { key: userInfo.userId, "user-info": userInfo }, null, 8, ["user-info"]); }), 128)) ]) ]), !unref(isGeneralUser) && unref(currentActiveTabName) !== unref(USERS_STATUS).NOT_ENTER ? (openBlock(), createElementBlock("div", _hoisted_11, [ createElementVNode("div", { class: normalizeClass(["manage-member-button", unref(isMicrophoneDisableForAllUser) ? "lift-all" : ""]), onTouchstart: _cache[1] || (_cache[1] = ($event) => unref(toggleManageAllMember)(unref(ManageControlType).AUDIO)) }, toDisplayString(unref(audioManageInfo)), 35), createElementVNode("div", { class: normalizeClass(["manage-member-button", unref(isCameraDisableForAllUser) ? "lift-all" : ""]), onTouchstart: _cache[2] || (_cache[2] = ($event) => unref(toggleManageAllMember)(unref(ManageControlType).VIDEO)) }, toDisplayString(unref(videoManageInfo)), 35), createElementVNode("div", { class: "manage-member-button", onTouchstart: _cache[3] || (_cache[3] = //@ts-ignore (...args) => unref(toggleClickMoreBtn) && unref(toggleClickMoreBtn)(...args)) }, [ createTextVNode(toDisplayString(unref(t)("More")) + " ", 1), withDirectives(createElementVNode("div", _hoisted_12, [ createElementVNode("div", _hoisted_13, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(moreControlList), (item) => { return openBlock(), createElementBlock("div", { key: item.type, class: "user-operate-item", onTouchstart: ($event) => item.func(item.type) }, [ createVNode(SvgIcon, { icon: item.icon }, null, 8, ["icon"]), createElementVNode("span", _hoisted_15, toDisplayString(item.title), 1) ], 40, _hoisted_14); }), 128)) ]) ], 512), [ [vShow, unref(showMoreControl)] ]) ], 32) ])) : createCommentVNode("", true), unref(currentActiveTabName) === unref(USERS_STATUS).NOT_ENTER ? (openBlock(), createElementBlock("div", _hoisted_16, [ unref(filteredUserStatusList).length > 0 ? (openBlock(), createElementBlock("div", { key: 0, class: "button-bottom", onClick: _cache[4] || (_cache[4] = //@ts-ignore (...args) => unref(handleCallAllInvitee) && unref(handleCallAllInvitee)(...args)) }, toDisplayString(unref(t)("Call all")), 1)) : createCommentVNode("", true) ])) : createCommentVNode("", true), createVNode(unref(Dialog), { modelValue: unref(showManageAllUserDialog), "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(showManageAllUserDialog) ? showManageAllUserDialog.value = $event : null), title: unref(dialogTitle), width: "480px", modal: true, "append-to-room-container": true, "confirm-button": unref(t)("Confirm"), "cancel-button": unref(t)("Cancel"), onConfirm: unref(doToggleManageAllMember), onCancel: _cache[6] || (_cache[6] = ($event) => showManageAllUserDialog.value = false) }, { default: withCtx(() => [ createElementVNode("span", null, toDisplayString(unref(dialogContent)), 1) ]), _: 1 }, 8, ["modelValue", "title", "confirm-button", "cancel-button", "onConfirm"]) ]); }; } }); export { _sfc_main as default };