feat: add fulscreen mode, dark mode

This commit is contained in:
Nikita Kiselev
2025-07-12 10:06:07 +03:00
parent 1e454b8f23
commit 252854e67e
9 changed files with 82 additions and 22 deletions

View File

@@ -1,8 +1,27 @@
import { createApp } from 'vue'
import App from './App.vue'
import './style.css'
import { VueTelegramPlugin } from 'vue-tg';
createApp(App).mount('#app')
const tg = window.Telegram.WebApp;
const app = createApp(App);
app.use(VueTelegramPlugin);
app.mount('#app');
import { useMiniApp, useTheme, onThemeChanged } from 'vue-tg';
const theme = useTheme();
const tg = useMiniApp();
onThemeChanged(() => {
// handle theme update
})
theme.onChange(() => {
document.documentElement.setAttribute('data-theme', theme.colorScheme.value);
});
document.documentElement.setAttribute('data-theme', theme.colorScheme.value);
tg.ready();