fix: night theme

This commit is contained in:
Nikita Kiselev
2025-07-22 23:31:39 +03:00
parent db18f3ae16
commit 06a6dca656
2 changed files with 2 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="ru" data-theme="cyberpunk">
<html lang="ru">
<head>
<meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/vite.svg"/>

View File

@@ -31,6 +31,7 @@ import {useProductsStore} from "@/stores/ProductsStore.js";
import {useCategoriesStore} from "@/stores/CategoriesStore.js";
if (config.night_auto) {
document.documentElement.setAttribute('data-theme', config.theme[this.colorScheme]);
window.Telegram.WebApp.onEvent('themeChanged', function () {
document.documentElement.setAttribute('data-theme', config.theme[this.colorScheme]);
});