feat: zoom initialization and toast container in App.vue
This commit is contained in:
13
src/App.vue
13
src/App.vue
@@ -1,7 +1,20 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { onMounted } from 'vue'
|
||||||
import TitleBar from './components/TitleBar.vue'
|
import TitleBar from './components/TitleBar.vue'
|
||||||
import NavRail from './components/NavRail.vue'
|
import NavRail from './components/NavRail.vue'
|
||||||
import ToastNotification from './components/ToastNotification.vue'
|
import ToastNotification from './components/ToastNotification.vue'
|
||||||
|
import { useSettingsStore } from './stores/settings'
|
||||||
|
|
||||||
|
const settingsStore = useSettingsStore()
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await settingsStore.fetchSettings()
|
||||||
|
const zoom = parseInt(settingsStore.settings.ui_zoom) || 100
|
||||||
|
const app = document.getElementById('app')
|
||||||
|
if (app) {
|
||||||
|
(app.style as any).zoom = `${zoom}%`
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user