move font size to Pari Plus!

This commit is contained in:
fly_mc 2024-10-26 20:03:45 +08:00
parent 7f3df04967
commit 32394e62ae
2 changed files with 12 additions and 11 deletions

View file

@ -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',

View file

@ -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'));