mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 09:13:50 +02:00
rename
This commit is contained in:
35
src/plugins/ui.js
Normal file
35
src/plugins/ui.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
// changeAppDarkStyle,
|
||||
changeAppThemeStyle,
|
||||
changeHtmlLangAttribute,
|
||||
getThemeMode,
|
||||
initThemeColor,
|
||||
refreshCustomCss
|
||||
// setLoginContainerStyle
|
||||
} from '../shared/utils/base/ui';
|
||||
import { i18n, loadLocalizedStrings } from './i18n';
|
||||
|
||||
import configRepository from '../services/config';
|
||||
|
||||
export async function initUi() {
|
||||
try {
|
||||
const language = await configRepository.getString(
|
||||
'VRCX_appLanguage',
|
||||
'en'
|
||||
);
|
||||
// @ts-ignore
|
||||
i18n.locale = language;
|
||||
await loadLocalizedStrings(language);
|
||||
changeHtmlLangAttribute(language);
|
||||
|
||||
const { initThemeMode, isDarkMode } =
|
||||
await getThemeMode(configRepository);
|
||||
// setLoginContainerStyle(isDarkMode);
|
||||
changeAppThemeStyle(initThemeMode);
|
||||
await initThemeColor();
|
||||
} catch (error) {
|
||||
console.error('Error initializing locale and theme:', error);
|
||||
}
|
||||
|
||||
refreshCustomCss();
|
||||
}
|
||||
Reference in New Issue
Block a user