@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,
63 lines (62 loc) • 2.46 kB
JavaScript
import { defineComponent, createElementBlock, openBlock, createVNode, withDirectives, unref, withCtx, vShow } from "vue";
import { storeToRefs } from "pinia";
import IconButton from "../common/base/IconButton.vue.mjs";
import StageApplicationIcon from "../common/icons/StageApplicationIcon.vue.mjs";
import { useBasicStore } from "../../stores/basic.mjs";
import { useRoomStore } from "../../stores/room.mjs";
import { useI18n } from "../../locales/index.mjs";
import TuiBadge from "../common/base/Badge.vue.mjs";
import { isMobile } from "../../utils/environment.mjs";
import MasterApplyControl from "./ApplyControl/MasterApplyControl/index.vue.mjs";
import useMasterApplyControl from "../../hooks/useMasterApplyControl.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "ManageStageControl",
setup(__props) {
const { t } = useI18n();
const basicStore = useBasicStore();
const roomStore = useRoomStore();
const { handleShowNotification } = useMasterApplyControl();
const { sidebarName, showApplyUserList } = storeToRefs(basicStore);
const { applyToAnchorList } = storeToRefs(roomStore);
function toggleManageStage() {
if (!isMobile) {
basicStore.setShowApplyUserList(!showApplyUserList.value);
} else {
if (basicStore.isSidebarOpen && basicStore.sidebarName === "apply") {
basicStore.setSidebarOpenStatus(false);
basicStore.setSidebarName("");
return;
}
basicStore.setSidebarOpenStatus(true);
basicStore.setSidebarName("apply");
}
}
handleShowNotification();
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", null, [
createVNode(TuiBadge, {
hidden: unref(applyToAnchorList).length === 0,
value: unref(applyToAnchorList).length,
max: 10,
type: "danger"
}, {
default: withCtx(() => [
createVNode(IconButton, {
title: unref(t)("Apply to stage"),
icon: StageApplicationIcon,
"is-active": unref(sidebarName) === "apply",
onClickIcon: toggleManageStage
}, null, 8, ["title", "is-active"])
]),
_: 1
}, 8, ["hidden", "value"]),
withDirectives(createVNode(MasterApplyControl, null, null, 512), [
[vShow, unref(showApplyUserList)]
])
]);
};
}
});
export {
_sfc_main as default
};