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,

36 lines (35 loc) 1.2 kB
var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); import i18n from "../../locales/index.mjs"; import { EventType } from "../types.mjs"; const THEME = { LIGHT: "light", DARK: "dark" }; class ConfigManager { constructor(service) { __publicField(this, "service"); this.service = service; } setTheme(theme) { const isDarkTheme = theme === THEME.DARK; document.body.classList.toggle(`tui-theme-${THEME.DARK}`, isDarkTheme); document.body.classList.toggle(`tui-theme-${THEME.LIGHT}`, !isDarkTheme); this.service.basicStore.setDefaultTheme( isDarkTheme ? THEME.DARK : THEME.LIGHT ); this.service.emit( EventType.THEME_CHANGED, isDarkTheme ? THEME.DARK : THEME.LIGHT ); } setLanguage(language) { i18n.global.locale.value = language; this.service.basicStore.setLang(language); this.service.emit(EventType.LANGUAGE_CHANGED, language); } } export { ConfigManager };