feat: add fulscreen mode, dark mode
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user