fix: zen mode on refresh

This commit is contained in:
Anthony Fu 2023-01-14 11:09:17 +01:00
parent 680b3493b3
commit bef1371516
5 changed files with 18 additions and 14 deletions

View file

@ -1,10 +0,0 @@
import { fontSizeMap } from '~/constants/options'
import { DEFAULT_FONT_SIZE } from '~/constants'
export default defineNuxtPlugin(() => {
const userSettings = useUserSettings()
const html = document.querySelector('html')!
watchEffect(() => {
html.style.setProperty('--font-size', fontSizeMap[userSettings.value.fontSize || DEFAULT_FONT_SIZE])
})
})