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,

90 lines (89 loc) 3.92 kB
import { defineComponent, computed, createElementBlock, createCommentVNode, unref, openBlock, createElementVNode, createVNode, toDisplayString, Fragment, renderList, normalizeClass, createBlock, pushScopeId, popScopeId } from "vue"; import SvgIcon from "../common/base/SvgIcon.vue.mjs"; import AudioSettingTab from "../common/AudioSettingTab.vue.mjs"; import VideoSettingTab from "../common/VideoSettingTab.vue.mjs"; import { useBasicStore } from "../../stores/basic.mjs"; import { storeToRefs } from "pinia"; import { SettingMode } from "../../constants/render.mjs"; import { useI18n } from "../../locales/index.mjs"; import CloseIcon from "../common/icons/CloseIcon.vue.mjs"; const _withScopeId = (n) => (pushScopeId("data-v-5bfb3eb3"), n = n(), popScopeId(), n); const _hoisted_1 = { class: "setting-container" }; const _hoisted_2 = { class: "setting-header" }; const _hoisted_3 = { class: "setting-title" }; const _hoisted_4 = { class: "setting-body" }; const _hoisted_5 = { class: "setting-tabs" }; const _hoisted_6 = ["onClick"]; const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "divide-line" }, null, -1)); const _hoisted_8 = { class: "setting-content" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index", setup(__props) { const { t } = useI18n(); const basicStore = useBasicStore(); const { showSettingDialog, activeSettingTab } = storeToRefs(basicStore); const settingTabsTitleList = computed(() => [ { label: t("Audio settings"), value: "audio" }, { label: t("Camera settings"), value: "video" } ]); function handleUpdateActiveTab(tabTitle) { basicStore.setActiveSettingTab(tabTitle); } function handleCloseSettingDialog() { basicStore.setShowSettingDialog(false); } function handleOverlayClick(event) { if (event.target !== event.currentTarget) { return; } handleCloseSettingDialog(); } return (_ctx, _cache) => { return unref(showSettingDialog) ? (openBlock(), createElementBlock("div", { key: 0, class: "overlay-container overlay", onClick: handleOverlayClick }, [ createElementVNode("div", _hoisted_1, [ createElementVNode("div", _hoisted_2, [ createElementVNode("span", _hoisted_3, toDisplayString(unref(t)("Settings")), 1), createVNode(SvgIcon, { class: "close-icon", icon: CloseIcon, onClick: handleCloseSettingDialog }) ]), createElementVNode("div", _hoisted_4, [ createElementVNode("div", _hoisted_5, [ (openBlock(true), createElementBlock(Fragment, null, renderList(settingTabsTitleList.value, (item, index) => { return openBlock(), createElementBlock("div", { key: index, class: normalizeClass([ "tabs-title", `${unref(activeSettingTab) === item.value ? "active" : ""}` ]), onClick: ($event) => handleUpdateActiveTab(item.value) }, toDisplayString(item.label), 11, _hoisted_6); }), 128)) ]), _hoisted_7, createElementVNode("div", _hoisted_8, [ unref(activeSettingTab) === "audio" ? (openBlock(), createBlock(AudioSettingTab, { key: 0, class: "setting-tab", mode: unref(SettingMode).DETAIL }, null, 8, ["mode"])) : unref(activeSettingTab) === "video" ? (openBlock(), createBlock(VideoSettingTab, { key: 1, class: "setting-tab", "with-preview": true })) : createCommentVNode("", true) ]) ]) ]) ])) : createCommentVNode("", true); }; } }); export { _sfc_main as default };