v2
This commit is contained in:
21
src/App.vue
21
src/App.vue
@@ -3,5 +3,24 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
//
|
||||
import { inject, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import type { WebApp } from '@twa-dev/types'
|
||||
import { useTextSizeStore } from './stores/textSize'
|
||||
|
||||
const router = useRouter()
|
||||
const tg = inject('tg') as WebApp
|
||||
tg.onEvent('settingsButtonClicked', async () => {
|
||||
await router.push({ name: 'settings' })
|
||||
})
|
||||
|
||||
const textSizeStore = useTextSizeStore()
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await textSizeStore.initialize()
|
||||
} catch (err) {
|
||||
console.error('Error load font size:', err)
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user