This commit is contained in:
pa
2026-03-10 17:44:15 +09:00
parent 17b582c904
commit ff1529920b
237 changed files with 419 additions and 419 deletions

35
src/plugins/ui.js Normal file
View 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();
}