refactor: migrate to nuxt compatibilityVersion: 4 (#3298)
This commit is contained in:
parent
46e4433e1c
commit
a3fbc056a9
342 changed files with 1200 additions and 2932 deletions
|
@ -1,18 +0,0 @@
|
|||
import type { OldFontSize } from '~/composables/settings'
|
||||
import { DEFAULT_FONT_SIZE } from '~/constants'
|
||||
import { oldFontSizeMap } from '~/constants/options'
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
const userSettings = useUserSettings()
|
||||
const html = document.documentElement
|
||||
watchEffect(() => {
|
||||
const { fontSize } = userSettings.value
|
||||
html.style.setProperty('--font-size', fontSize ? (oldFontSizeMap[fontSize as OldFontSize] ?? fontSize) : DEFAULT_FONT_SIZE)
|
||||
})
|
||||
watchEffect(() => {
|
||||
html.classList.toggle('zen', getPreferences(userSettings.value, 'zenMode'))
|
||||
})
|
||||
watchEffect(() => {
|
||||
Object.entries(userSettings.value.themeColors || {}).forEach(([k, v]) => html.style.setProperty(k, v))
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue