diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index cc22f3ffd..e2ad2f379 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -267,20 +267,9 @@ import { globalEvents } from '@/events.js'; import { claimAchievement } from '@/scripts/achievements.js'; const lang = ref(miLocalStorage.getItem('lang')); -const fontSizeNumber = ref(Number(miLocalStorage.getItem('fontSize') || 1)); -const fontSizeNumberOld = ref(fontSizeNumber.value); const useSystemFont = ref(miLocalStorage.getItem('useSystemFont') != null); const dataSaver = ref(defaultStore.state.dataSaver); -const fontSizePx = computed(() => fontSizeNumber.value + 14); - -function saveFontSize() { - miLocalStorage.setItem('fontSize', fontSizeNumber.value.toString()); - window.document.documentElement.classList.remove('f-' + fontSizeNumberOld.value); - window.document.documentElement.classList.add('f-' + fontSizeNumber.value); - fontSizeNumberOld.value = fontSizeNumber.value; -} - async function reloadAsk() { const { canceled } = await os.confirm({ type: 'info', diff --git a/packages/frontend/src/pages/settings/pari.vue b/packages/frontend/src/pages/settings/pari.vue index 5c17c66c8..9cbc16b18 100644 --- a/packages/frontend/src/pages/settings/pari.vue +++ b/packages/frontend/src/pages/settings/pari.vue @@ -87,6 +87,18 @@ import FormSection from '@/components/form/section.vue'; const defaultFont = getDefaultFontSettings(); console.log(defaultFont); +const fontSizeNumber = ref(Number(miLocalStorage.getItem('fontSize') || 1)); +const fontSizeNumberOld = ref(fontSizeNumber.value); + +const fontSizePx = computed(() => fontSizeNumber.value + 14); + +function saveFontSize() { + miLocalStorage.setItem('fontSize', fontSizeNumber.value.toString()); + window.document.documentElement.classList.remove('f-' + fontSizeNumberOld.value); + window.document.documentElement.classList.add('f-' + fontSizeNumber.value); + fontSizeNumberOld.value = fontSizeNumber.value; +} + const autoTranslateButton = computed(defaultStore.makeGetterSetter('autoTranslateButton')); const showDetailTimeWhenHover = computed(defaultStore.makeGetterSetter('showDetailTimeWhenHover')); const noteClickToOpen = computed(defaultStore.makeGetterSetter('noteClickToOpen'));