This commit is contained in:
syuilo 2020-11-28 13:05:57 +09:00
parent 0281961f15
commit 10fb029609
4 changed files with 24 additions and 3 deletions

View file

@ -649,6 +649,7 @@ pageLikesCount: "Pageにいいねした数"
pageLikedCount: "Pageにいいねされた数" pageLikedCount: "Pageにいいねされた数"
reversiCount: "リバーシの対局数" reversiCount: "リバーシの対局数"
contact: "連絡先" contact: "連絡先"
useSystemFont: "システムのデフォルトのフォントを使う"
_aboutMisskey: _aboutMisskey:
about: "Misskeyはsyuiloによって2014年から開発されている、オープンソースのソフトウェアです。" about: "Misskeyはsyuiloによって2014年から開発されている、オープンソースのソフトウェアです。"

View file

@ -33,11 +33,12 @@
<FormSwitch v-model:value="disableAnimatedMfm">{{ $t('disableAnimatedMfm') }}</FormSwitch> <FormSwitch v-model:value="disableAnimatedMfm">{{ $t('disableAnimatedMfm') }}</FormSwitch>
<FormSwitch v-model:value="reduceAnimation">{{ $t('reduceUiAnimation') }}</FormSwitch> <FormSwitch v-model:value="reduceAnimation">{{ $t('reduceUiAnimation') }}</FormSwitch>
<FormSwitch v-model:value="useBlurEffectForModal">{{ $t('useBlurEffectForModal') }}</FormSwitch> <FormSwitch v-model:value="useBlurEffectForModal">{{ $t('useBlurEffectForModal') }}</FormSwitch>
<FormSwitch v-model:value="loadRawImages">{{ $t('loadRawImages') }}</FormSwitch>
<FormSwitch v-model:value="disableShowingAnimatedImages">{{ $t('disableShowingAnimatedImages') }}</FormSwitch>
<FormSwitch v-model:value="useSystemFont">{{ $t('useSystemFont') }}</FormSwitch>
<FormSwitch v-model:value="useOsNativeEmojis">{{ $t('useOsNativeEmojis') }} <FormSwitch v-model:value="useOsNativeEmojis">{{ $t('useOsNativeEmojis') }}
<div><Mfm text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></div> <div><Mfm text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></div>
</FormSwitch> </FormSwitch>
<FormSwitch v-model:value="loadRawImages">{{ $t('loadRawImages') }}</FormSwitch>
<FormSwitch v-model:value="disableShowingAnimatedImages">{{ $t('disableShowingAnimatedImages') }}</FormSwitch>
</FormGroup> </FormGroup>
<FormRadios v-model="fontSize"> <FormRadios v-model="fontSize">
@ -118,6 +119,7 @@ export default defineComponent({
langs, langs,
lang: localStorage.getItem('lang'), lang: localStorage.getItem('lang'),
fontSize: localStorage.getItem('fontSize'), fontSize: localStorage.getItem('fontSize'),
useSystemFont: localStorage.getItem('useSystemFont') != null,
faImage, faCog, faColumns faImage, faCog, faColumns
} }
}, },
@ -221,6 +223,15 @@ export default defineComponent({
location.reload(); location.reload();
}, },
useSystemFont() {
if (this.useSystemFont) {
localStorage.setItem('useSystemFont', 't');
} else {
localStorage.removeItem('useSystemFont');
}
location.reload();
},
enableInfiniteScroll() { enableInfiniteScroll() {
location.reload() location.reload()
}, },

View file

@ -27,7 +27,7 @@ html {
color: var(--fg); color: var(--fg);
overflow: auto; overflow: auto;
font-family: "BIZ UDPGothic", Roboto, HelveticaNeue, Arial, sans-serif; font-family: "BIZ UDPGothic", Roboto, HelveticaNeue, Arial, sans-serif;
line-height: 1.3em; line-height: 1.35em;
text-size-adjust: 100%; text-size-adjust: 100%;
&, * { &, * {
@ -75,6 +75,10 @@ html {
&.f-veryLarge { &.f-veryLarge {
font-size: 1.2em; font-size: 1.2em;
} }
&.useSystemFont {
font-family: sans-serif;
}
} }
html.changing-theme { html.changing-theme {

View file

@ -94,6 +94,11 @@ html
document.documentElement.classList.add('f-' + fontSize); document.documentElement.classList.add('f-' + fontSize);
} }
const useSystemFont = localStorage.getItem('useSystemFont');
if (useSystemFont) {
document.documentElement.classList.add('useSystemFont');
}
const wallpaper = localStorage.getItem('wallpaper'); const wallpaper = localStorage.getItem('wallpaper');
if (wallpaper) { if (wallpaper) {
document.documentElement.style.backgroundImage = `url(${wallpaper})`; document.documentElement.style.backgroundImage = `url(${wallpaper})`;