add font settings page

This commit is contained in:
MaysWind
2023-06-13 01:33:54 +08:00
parent a1c828fe62
commit bebd043d58
4 changed files with 109 additions and 22 deletions
+1 -22
View File
@@ -26,16 +26,7 @@
</select>
</f7-list-item>
<f7-list-item
:key="currentLocale + '_fontSize'"
:title="$t('Font Size')"
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: $t('Font Size'), searchbarDisableText: $t('Cancel'), appendSearchbarNotFound: $t('No results'), popupCloseLinkText: $t('Done') }">
<select v-model="fontSize">
<option value="default">{{ $t('Default') }}</option>
<option value="large">{{ $t('Large') }}</option>
<option value="extraLarge">{{ $t('Extra Large') }}</option>
</select>
</f7-list-item>
<f7-list-item :title="$t('Font Size')" link="/settings/fontsize"></f7-list-item>
<f7-list-item
:key="currentLocale + '_timezone'"
@@ -113,7 +104,6 @@ import { useUserStore } from '@/stores/user.js';
import { useExchangeRatesStore } from '@/stores/exchangeRates.js';
import currencyConstants from '@/consts/currency.js';
import { setAppFontSize } from '@/lib/ui.mobile.js';
export default {
props: [
@@ -147,17 +137,6 @@ export default {
}
}
},
fontSize: {
get: function () {
return this.$settings.getFontSize();
},
set: function (value) {
if (value !== this.$settings.getFontSize()) {
this.$settings.setFontSize(value);
setAppFontSize(value);
}
}
},
currentTimezone: {
get: function () {
return this.$locale.getTimezone();