This commit is contained in:
2026-05-17 20:54:53 +05:00
parent 65a0babeab
commit 27eb4fd606
90 changed files with 12343 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
// Применяет тему и язык к документу при загрузке/смене настроек.
export function applyTheme(theme: string | undefined) {
const id = theme && typeof theme === 'string' ? theme : 'mk-dark';
document.documentElement.setAttribute('data-theme', id);
}
export function applyLocale(locale: string | undefined) {
const id = locale && typeof locale === 'string' ? locale : 'ru';
document.documentElement.setAttribute('lang', id);
}
export function applyInstanceName(name: string | undefined) {
if (name) document.title = name;
}