2020-10-17 14:12:00 +03:00
|
|
|
<template>
|
2020-11-25 14:31:34 +02:00
|
|
|
<FormBase>
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSwitch v-model="showFixedPostForm">{{ $ts.showFixedPostForm }}</FormSwitch>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSelect v-model="lang">
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.uiLanguage }}</template>
|
2020-11-25 14:31:34 +02:00
|
|
|
<option v-for="x in langs" :value="x[0]" :key="x[0]">{{ x[1] }}</option>
|
|
|
|
<template #caption>
|
2020-12-26 03:47:36 +02:00
|
|
|
<I18n :src="$ts.i18nInfo" tag="span">
|
2020-11-25 14:31:34 +02:00
|
|
|
<template #link>
|
|
|
|
<MkLink url="https://crowdin.com/project/misskey">Crowdin</MkLink>
|
|
|
|
</template>
|
2020-12-26 03:01:32 +02:00
|
|
|
</I18n>
|
2020-11-25 14:31:34 +02:00
|
|
|
</template>
|
|
|
|
</FormSelect>
|
|
|
|
|
|
|
|
<FormGroup>
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.behavior }}</template>
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSwitch v-model="imageNewTab">{{ $ts.openImageInNewTab }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="enableInfiniteScroll">{{ $ts.enableInfiniteScroll }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="useReactionPickerForContextMenu">{{ $ts.useReactionPickerForContextMenu }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="disablePagesScript">{{ $ts.disablePagesScript }}</FormSwitch>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormGroup>
|
|
|
|
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSelect v-model="serverDisconnectedBehavior">
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.whenServerDisconnected }}</template>
|
|
|
|
<option value="reload">{{ $ts._serverDisconnectedBehavior.reload }}</option>
|
|
|
|
<option value="dialog">{{ $ts._serverDisconnectedBehavior.dialog }}</option>
|
|
|
|
<option value="quiet">{{ $ts._serverDisconnectedBehavior.quiet }}</option>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormSelect>
|
|
|
|
|
|
|
|
<FormGroup>
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.appearance }}</template>
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSwitch v-model="disableAnimatedMfm">{{ $ts.disableAnimatedMfm }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="reduceAnimation">{{ $ts.reduceUiAnimation }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="useBlurEffect">{{ $ts.useBlurEffect }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="useBlurEffectForModal">{{ $ts.useBlurEffectForModal }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="showGapBetweenNotesInTimeline">{{ $ts.showGapBetweenNotesInTimeline }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="loadRawImages">{{ $ts.loadRawImages }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="disableShowingAnimatedImages">{{ $ts.disableShowingAnimatedImages }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="squareAvatars">{{ $ts.squareAvatars }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="useSystemFont">{{ $ts.useSystemFont }}</FormSwitch>
|
|
|
|
<FormSwitch v-model="useOsNativeEmojis">{{ $ts.useOsNativeEmojis }}
|
2020-12-19 03:55:52 +02:00
|
|
|
<div><Mfm text="🍮🍦🍭🍩🍰🍫🍬🥞🍪" :key="useOsNativeEmojis"/></div>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormSwitch>
|
|
|
|
</FormGroup>
|
|
|
|
|
2021-09-04 11:54:24 +03:00
|
|
|
<FormGroup>
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSwitch v-model="aiChanMode">{{ $ts.aiChanMode }}</FormSwitch>
|
2021-09-04 11:54:24 +03:00
|
|
|
</FormGroup>
|
|
|
|
|
2020-11-25 14:31:34 +02:00
|
|
|
<FormRadios v-model="fontSize">
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #desc>{{ $ts.fontSize }}</template>
|
2020-11-25 14:31:34 +02:00
|
|
|
<option value="small"><span style="font-size: 14px;">Aa</span></option>
|
|
|
|
<option :value="null"><span style="font-size: 16px;">Aa</span></option>
|
|
|
|
<option value="large"><span style="font-size: 18px;">Aa</span></option>
|
|
|
|
<option value="veryLarge"><span style="font-size: 20px;">Aa</span></option>
|
|
|
|
</FormRadios>
|
|
|
|
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSelect v-model="instanceTicker">
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.instanceTicker }}</template>
|
|
|
|
<option value="none">{{ $ts._instanceTicker.none }}</option>
|
|
|
|
<option value="remote">{{ $ts._instanceTicker.remote }}</option>
|
|
|
|
<option value="always">{{ $ts._instanceTicker.always }}</option>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormSelect>
|
|
|
|
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSelect v-model="nsfw">
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.nsfw }}</template>
|
|
|
|
<option value="respect">{{ $ts._nsfw.respect }}</option>
|
|
|
|
<option value="ignore">{{ $ts._nsfw.ignore }}</option>
|
|
|
|
<option value="force">{{ $ts._nsfw.force }}</option>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormSelect>
|
|
|
|
|
|
|
|
<FormGroup>
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.defaultNavigationBehaviour }}</template>
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSwitch v-model="defaultSideView">{{ $ts.openInSideView }}</FormSwitch>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormGroup>
|
|
|
|
|
2021-09-29 18:50:45 +03:00
|
|
|
<FormSelect v-model="chatOpenBehavior">
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.chatOpenBehavior }}</template>
|
|
|
|
<option value="page">{{ $ts.showInPage }}</option>
|
|
|
|
<option value="window">{{ $ts.openInWindow }}</option>
|
|
|
|
<option value="popout">{{ $ts.popout }}</option>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormSelect>
|
|
|
|
|
2020-12-26 03:47:36 +02:00
|
|
|
<FormLink to="/settings/deck">{{ $ts.deck }}</FormLink>
|
2021-07-13 18:11:05 +03:00
|
|
|
|
|
|
|
<FormLink to="/settings/custom-css"><template #icon><i class="fas fa-code"></i></template>{{ $ts.customCss }}</FormLink>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormBase>
|
2020-10-17 14:12:00 +03:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-11-11 19:02:25 +02:00
|
|
|
import FormSwitch from '@/components/debobigego/switch.vue';
|
|
|
|
import FormSelect from '@/components/debobigego/select.vue';
|
|
|
|
import FormRadios from '@/components/debobigego/radios.vue';
|
|
|
|
import FormBase from '@/components/debobigego/base.vue';
|
|
|
|
import FormGroup from '@/components/debobigego/group.vue';
|
|
|
|
import FormLink from '@/components/debobigego/link.vue';
|
|
|
|
import FormButton from '@/components/debobigego/button.vue';
|
|
|
|
import MkLink from '@/components/link.vue';
|
|
|
|
import { langs } from '@/config';
|
|
|
|
import { defaultStore } from '@/store';
|
|
|
|
import { ColdDeviceStorage } from '@/store';
|
|
|
|
import * as os from '@/os';
|
|
|
|
import { unisonReload } from '@/scripts/unison-reload';
|
|
|
|
import * as symbols from '@/symbols';
|
2020-10-17 14:12:00 +03:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2020-11-25 14:31:34 +02:00
|
|
|
MkLink,
|
|
|
|
FormSwitch,
|
|
|
|
FormSelect,
|
|
|
|
FormRadios,
|
|
|
|
FormBase,
|
|
|
|
FormGroup,
|
|
|
|
FormLink,
|
|
|
|
FormButton,
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['info'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2021-04-10 06:54:12 +03:00
|
|
|
[symbols.PAGE_INFO]: {
|
2020-12-26 03:47:36 +02:00
|
|
|
title: this.$ts.general,
|
2021-09-29 18:50:45 +03:00
|
|
|
icon: 'fas fa-cogs',
|
|
|
|
bg: 'var(--bg)'
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
|
|
|
langs,
|
|
|
|
lang: localStorage.getItem('lang'),
|
|
|
|
fontSize: localStorage.getItem('fontSize'),
|
2020-11-28 06:05:57 +02:00
|
|
|
useSystemFont: localStorage.getItem('useSystemFont') != null,
|
2020-10-17 14:12:00 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
2020-12-19 03:55:52 +02:00
|
|
|
serverDisconnectedBehavior: defaultStore.makeGetterSetter('serverDisconnectedBehavior'),
|
|
|
|
reduceAnimation: defaultStore.makeGetterSetter('animation', v => !v, v => !v),
|
|
|
|
useBlurEffectForModal: defaultStore.makeGetterSetter('useBlurEffectForModal'),
|
2021-08-11 16:34:45 +03:00
|
|
|
useBlurEffect: defaultStore.makeGetterSetter('useBlurEffect'),
|
2020-12-19 03:55:52 +02:00
|
|
|
showGapBetweenNotesInTimeline: defaultStore.makeGetterSetter('showGapBetweenNotesInTimeline'),
|
|
|
|
disableAnimatedMfm: defaultStore.makeGetterSetter('animatedMfm', v => !v, v => !v),
|
|
|
|
useOsNativeEmojis: defaultStore.makeGetterSetter('useOsNativeEmojis'),
|
|
|
|
disableShowingAnimatedImages: defaultStore.makeGetterSetter('disableShowingAnimatedImages'),
|
|
|
|
loadRawImages: defaultStore.makeGetterSetter('loadRawImages'),
|
|
|
|
imageNewTab: defaultStore.makeGetterSetter('imageNewTab'),
|
|
|
|
nsfw: defaultStore.makeGetterSetter('nsfw'),
|
|
|
|
disablePagesScript: defaultStore.makeGetterSetter('disablePagesScript'),
|
|
|
|
showFixedPostForm: defaultStore.makeGetterSetter('showFixedPostForm'),
|
|
|
|
defaultSideView: defaultStore.makeGetterSetter('defaultSideView'),
|
|
|
|
chatOpenBehavior: ColdDeviceStorage.makeGetterSetter('chatOpenBehavior'),
|
|
|
|
instanceTicker: defaultStore.makeGetterSetter('instanceTicker'),
|
|
|
|
enableInfiniteScroll: defaultStore.makeGetterSetter('enableInfiniteScroll'),
|
2021-02-20 09:16:19 +02:00
|
|
|
useReactionPickerForContextMenu: defaultStore.makeGetterSetter('useReactionPickerForContextMenu'),
|
2021-07-19 09:11:28 +03:00
|
|
|
squareAvatars: defaultStore.makeGetterSetter('squareAvatars'),
|
2021-09-04 11:54:24 +03:00
|
|
|
aiChanMode: defaultStore.makeGetterSetter('aiChanMode'),
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
lang() {
|
|
|
|
localStorage.setItem('lang', this.lang);
|
2020-12-26 08:27:39 +02:00
|
|
|
localStorage.removeItem('locale');
|
2020-12-28 10:18:13 +02:00
|
|
|
this.reloadAsk();
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
fontSize() {
|
|
|
|
if (this.fontSize == null) {
|
|
|
|
localStorage.removeItem('fontSize');
|
|
|
|
} else {
|
|
|
|
localStorage.setItem('fontSize', this.fontSize);
|
|
|
|
}
|
2020-12-28 10:18:13 +02:00
|
|
|
this.reloadAsk();
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
|
|
|
|
2020-11-28 06:05:57 +02:00
|
|
|
useSystemFont() {
|
|
|
|
if (this.useSystemFont) {
|
|
|
|
localStorage.setItem('useSystemFont', 't');
|
|
|
|
} else {
|
|
|
|
localStorage.removeItem('useSystemFont');
|
|
|
|
}
|
2020-12-28 10:18:13 +02:00
|
|
|
this.reloadAsk();
|
2020-11-28 06:05:57 +02:00
|
|
|
},
|
|
|
|
|
2020-10-17 14:12:00 +03:00
|
|
|
enableInfiniteScroll() {
|
2020-12-28 10:18:13 +02:00
|
|
|
this.reloadAsk();
|
|
|
|
},
|
|
|
|
|
2021-07-19 09:11:28 +03:00
|
|
|
squareAvatars() {
|
|
|
|
this.reloadAsk();
|
|
|
|
},
|
|
|
|
|
2021-09-04 11:54:24 +03:00
|
|
|
aiChanMode() {
|
|
|
|
this.reloadAsk();
|
|
|
|
},
|
|
|
|
|
2020-12-28 10:18:13 +02:00
|
|
|
showGapBetweenNotesInTimeline() {
|
|
|
|
this.reloadAsk();
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
2020-12-29 04:54:26 +02:00
|
|
|
|
2021-01-03 16:52:09 +02:00
|
|
|
instanceTicker() {
|
|
|
|
this.reloadAsk();
|
|
|
|
},
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
2021-04-10 06:54:12 +03:00
|
|
|
this.$emit('info', this[symbols.PAGE_INFO]);
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
2020-12-28 10:18:13 +02:00
|
|
|
|
|
|
|
methods: {
|
|
|
|
async reloadAsk() {
|
2021-11-18 11:45:58 +02:00
|
|
|
const { canceled } = await os.confirm({
|
2020-12-28 10:18:13 +02:00
|
|
|
type: 'info',
|
|
|
|
text: this.$ts.reloadToApplySetting,
|
|
|
|
});
|
|
|
|
if (canceled) return;
|
|
|
|
|
2021-02-17 14:36:56 +02:00
|
|
|
unisonReload();
|
2020-12-28 10:18:13 +02:00
|
|
|
}
|
|
|
|
}
|
2020-10-17 14:12:00 +03:00
|
|
|
});
|
|
|
|
</script>
|