2020-10-17 14:12:00 +03:00
|
|
|
<template>
|
2023-01-06 06:40:17 +02:00
|
|
|
<div class="_gaps_m">
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkSelect v-model="lang">
|
2022-05-04 04:13:51 +03:00
|
|
|
<template #label>{{ i18n.ts.uiLanguage }}</template>
|
2021-11-19 12:36:12 +02:00
|
|
|
<option v-for="x in langs" :key="x[0]" :value="x[0]">{{ x[1] }}</option>
|
2020-11-25 14:31:34 +02:00
|
|
|
<template #caption>
|
2022-05-04 04:13:51 +03:00
|
|
|
<I18n :src="i18n.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>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkSelect>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkRadios v-model="overridedDeviceKind">
|
2022-05-04 04:13:51 +03:00
|
|
|
<template #label>{{ i18n.ts.overridedDeviceKind }}</template>
|
|
|
|
<option :value="null">{{ i18n.ts.auto }}</option>
|
2022-12-19 12:01:30 +02:00
|
|
|
<option value="smartphone"><i class="ti ti-device-mobile"/> {{ i18n.ts.smartphone }}</option>
|
|
|
|
<option value="tablet"><i class="ti ti-device-tablet"/> {{ i18n.ts.tablet }}</option>
|
|
|
|
<option value="desktop"><i class="ti ti-device-desktop"/> {{ i18n.ts.desktop }}</option>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkRadios>
|
2022-02-08 11:46:39 +02:00
|
|
|
|
2023-01-07 07:59:54 +02:00
|
|
|
<MkSwitch v-model="showFixedPostForm">{{ i18n.ts.showFixedPostForm }}</MkSwitch>
|
2023-03-04 03:34:54 +02:00
|
|
|
<MkSwitch v-model="showFixedPostFormInChannel">{{ i18n.ts.showFixedPostFormInChannel }}</MkSwitch>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2021-11-28 13:07:37 +02:00
|
|
|
<FormSection>
|
2022-05-04 04:13:51 +03:00
|
|
|
<template #label>{{ i18n.ts.behavior }}</template>
|
2021-11-28 13:07:37 +02:00
|
|
|
|
2023-01-06 06:40:17 +02:00
|
|
|
<div class="_gaps_m">
|
|
|
|
<div class="_gaps_s">
|
2023-01-07 07:59:54 +02:00
|
|
|
<MkSwitch v-model="imageNewTab">{{ i18n.ts.openImageInNewTab }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="enableInfiniteScroll">{{ i18n.ts.enableInfiniteScroll }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="useReactionPickerForContextMenu">{{ i18n.ts.useReactionPickerForContextMenu }}</MkSwitch>
|
2023-01-05 14:04:56 +02:00
|
|
|
</div>
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkSelect v-model="serverDisconnectedBehavior">
|
2023-01-05 14:04:56 +02:00
|
|
|
<template #label>{{ i18n.ts.whenServerDisconnected }}</template>
|
|
|
|
<option value="reload">{{ i18n.ts._serverDisconnectedBehavior.reload }}</option>
|
|
|
|
<option value="dialog">{{ i18n.ts._serverDisconnectedBehavior.dialog }}</option>
|
|
|
|
<option value="quiet">{{ i18n.ts._serverDisconnectedBehavior.quiet }}</option>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkSelect>
|
2023-01-05 14:04:56 +02:00
|
|
|
</div>
|
2021-11-28 13:07:37 +02:00
|
|
|
</FormSection>
|
|
|
|
|
|
|
|
<FormSection>
|
2022-05-04 04:13:51 +03:00
|
|
|
<template #label>{{ i18n.ts.appearance }}</template>
|
2022-12-26 09:04:56 +02:00
|
|
|
|
2023-01-06 06:40:17 +02:00
|
|
|
<div class="_gaps_m">
|
|
|
|
<div class="_gaps_s">
|
2023-02-28 13:53:32 +02:00
|
|
|
<MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch>
|
2023-02-12 01:18:22 +02:00
|
|
|
<MkSwitch v-model="collapseRenotes">{{ i18n.ts.collapseRenotes }}</MkSwitch>
|
2023-02-11 04:31:18 +02:00
|
|
|
<MkSwitch v-model="advancedMfm">{{ i18n.ts.enableAdvancedMfm }}</MkSwitch>
|
|
|
|
<MkSwitch v-if="advancedMfm" v-model="animatedMfm">{{ i18n.ts.enableAnimatedMfm }}</MkSwitch>
|
2023-01-07 07:59:54 +02:00
|
|
|
<MkSwitch v-model="reduceAnimation">{{ i18n.ts.reduceUiAnimation }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="useBlurEffect">{{ i18n.ts.useBlurEffect }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="useBlurEffectForModal">{{ i18n.ts.useBlurEffectForModal }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="disableShowingAnimatedImages">{{ i18n.ts.disableShowingAnimatedImages }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="squareAvatars">{{ i18n.ts.squareAvatars }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="useSystemFont">{{ i18n.ts.useSystemFont }}</MkSwitch>
|
|
|
|
<MkSwitch v-model="disableDrawer">{{ i18n.ts.disableDrawer }}</MkSwitch>
|
2023-01-05 14:04:56 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkRadios v-model="emojiStyle">
|
2023-01-05 14:04:56 +02:00
|
|
|
<template #label>{{ i18n.ts.emojiStyle }}</template>
|
|
|
|
<option value="native">{{ i18n.ts.native }}</option>
|
|
|
|
<option value="fluentEmoji">Fluent Emoji</option>
|
|
|
|
<option value="twemoji">Twemoji</option>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkRadios>
|
2023-01-05 14:04:56 +02:00
|
|
|
<div style="margin: 8px 0 0 0; font-size: 1.5em;"><Mfm :key="emojiStyle" text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></div>
|
|
|
|
</div>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkRadios v-model="fontSize">
|
2023-01-05 14:04:56 +02:00
|
|
|
<template #label>{{ i18n.ts.fontSize }}</template>
|
|
|
|
<option :value="null"><span style="font-size: 14px;">Aa</span></option>
|
|
|
|
<option value="1"><span style="font-size: 15px;">Aa</span></option>
|
|
|
|
<option value="2"><span style="font-size: 16px;">Aa</span></option>
|
|
|
|
<option value="3"><span style="font-size: 17px;">Aa</span></option>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkRadios>
|
2023-01-05 14:04:56 +02:00
|
|
|
</div>
|
2021-11-28 13:07:37 +02:00
|
|
|
</FormSection>
|
2021-09-04 11:54:24 +03:00
|
|
|
|
2021-11-28 13:07:37 +02:00
|
|
|
<FormSection>
|
2023-01-07 07:59:54 +02:00
|
|
|
<MkSwitch v-model="aiChanMode">{{ i18n.ts.aiChanMode }}</MkSwitch>
|
2021-11-28 13:07:37 +02:00
|
|
|
</FormSection>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkSelect v-model="instanceTicker">
|
2022-05-04 04:13:51 +03:00
|
|
|
<template #label>{{ i18n.ts.instanceTicker }}</template>
|
|
|
|
<option value="none">{{ i18n.ts._instanceTicker.none }}</option>
|
|
|
|
<option value="remote">{{ i18n.ts._instanceTicker.remote }}</option>
|
|
|
|
<option value="always">{{ i18n.ts._instanceTicker.always }}</option>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkSelect>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkSelect v-model="nsfw">
|
2022-05-04 04:13:51 +03:00
|
|
|
<template #label>{{ i18n.ts.nsfw }}</template>
|
|
|
|
<option value="respect">{{ i18n.ts._nsfw.respect }}</option>
|
|
|
|
<option value="ignore">{{ i18n.ts._nsfw.ignore }}</option>
|
|
|
|
<option value="force">{{ i18n.ts._nsfw.force }}</option>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkSelect>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2023-01-07 08:09:46 +02:00
|
|
|
<MkRange v-model="numberOfPageCache" :min="1" :max="10" :step="1" easing>
|
2022-06-30 04:53:40 +03:00
|
|
|
<template #label>{{ i18n.ts.numberOfPageCache }}</template>
|
|
|
|
<template #caption>{{ i18n.ts.numberOfPageCacheDescription }}</template>
|
2023-01-07 08:09:46 +02:00
|
|
|
</MkRange>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
2023-01-05 14:04:56 +02:00
|
|
|
<FormLink to="/settings/deck">{{ i18n.ts.deck }}</FormLink>
|
2021-07-13 18:11:05 +03:00
|
|
|
|
2023-01-05 14:04:56 +02:00
|
|
|
<FormLink to="/settings/custom-css"><template #icon><i class="ti ti-code"></i></template>{{ i18n.ts.customCss }}</FormLink>
|
2021-11-28 13:07:37 +02:00
|
|
|
</div>
|
2020-10-17 14:12:00 +03:00
|
|
|
</template>
|
|
|
|
|
2022-05-04 04:13:51 +03:00
|
|
|
<script lang="ts" setup>
|
2022-06-20 11:38:49 +03:00
|
|
|
import { computed, ref, watch } from 'vue';
|
2023-01-07 07:59:54 +02:00
|
|
|
import MkSwitch from '@/components/MkSwitch.vue';
|
2023-01-07 08:09:46 +02:00
|
|
|
import MkSelect from '@/components/MkSelect.vue';
|
|
|
|
import MkRadios from '@/components/MkRadios.vue';
|
|
|
|
import MkRange from '@/components/MkRange.vue';
|
2021-11-28 13:07:37 +02:00
|
|
|
import FormSection from '@/components/form/section.vue';
|
|
|
|
import FormLink from '@/components/form/link.vue';
|
2022-08-30 18:24:33 +03:00
|
|
|
import MkLink from '@/components/MkLink.vue';
|
2021-11-11 19:02:25 +02:00
|
|
|
import { langs } from '@/config';
|
|
|
|
import { defaultStore } from '@/store';
|
|
|
|
import * as os from '@/os';
|
|
|
|
import { unisonReload } from '@/scripts/unison-reload';
|
2022-05-04 04:13:51 +03:00
|
|
|
import { i18n } from '@/i18n';
|
2022-06-20 11:38:49 +03:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
2023-01-07 03:13:02 +02:00
|
|
|
import { miLocalStorage } from '@/local-storage';
|
2022-05-04 04:13:51 +03:00
|
|
|
|
2023-01-07 03:13:02 +02:00
|
|
|
const lang = ref(miLocalStorage.getItem('lang'));
|
|
|
|
const fontSize = ref(miLocalStorage.getItem('fontSize'));
|
|
|
|
const useSystemFont = ref(miLocalStorage.getItem('useSystemFont') != null);
|
2022-05-04 04:13:51 +03:00
|
|
|
|
|
|
|
async function reloadAsk() {
|
|
|
|
const { canceled } = await os.confirm({
|
|
|
|
type: 'info',
|
|
|
|
text: i18n.ts.reloadToApplySetting,
|
|
|
|
});
|
|
|
|
if (canceled) return;
|
|
|
|
|
|
|
|
unisonReload();
|
|
|
|
}
|
|
|
|
|
|
|
|
const overridedDeviceKind = computed(defaultStore.makeGetterSetter('overridedDeviceKind'));
|
|
|
|
const serverDisconnectedBehavior = computed(defaultStore.makeGetterSetter('serverDisconnectedBehavior'));
|
2023-02-28 13:53:32 +02:00
|
|
|
const showNoteActionsOnlyHover = computed(defaultStore.makeGetterSetter('showNoteActionsOnlyHover'));
|
2023-02-12 01:18:22 +02:00
|
|
|
const collapseRenotes = computed(defaultStore.makeGetterSetter('collapseRenotes'));
|
2022-05-04 04:13:51 +03:00
|
|
|
const reduceAnimation = computed(defaultStore.makeGetterSetter('animation', v => !v, v => !v));
|
|
|
|
const useBlurEffectForModal = computed(defaultStore.makeGetterSetter('useBlurEffectForModal'));
|
|
|
|
const useBlurEffect = computed(defaultStore.makeGetterSetter('useBlurEffect'));
|
|
|
|
const showGapBetweenNotesInTimeline = computed(defaultStore.makeGetterSetter('showGapBetweenNotesInTimeline'));
|
2023-02-11 04:31:18 +02:00
|
|
|
const animatedMfm = computed(defaultStore.makeGetterSetter('animatedMfm'));
|
|
|
|
const advancedMfm = computed(defaultStore.makeGetterSetter('advancedMfm'));
|
2022-12-26 09:04:56 +02:00
|
|
|
const emojiStyle = computed(defaultStore.makeGetterSetter('emojiStyle'));
|
2022-05-04 04:13:51 +03:00
|
|
|
const disableDrawer = computed(defaultStore.makeGetterSetter('disableDrawer'));
|
|
|
|
const disableShowingAnimatedImages = computed(defaultStore.makeGetterSetter('disableShowingAnimatedImages'));
|
|
|
|
const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages'));
|
|
|
|
const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab'));
|
|
|
|
const nsfw = computed(defaultStore.makeGetterSetter('nsfw'));
|
|
|
|
const showFixedPostForm = computed(defaultStore.makeGetterSetter('showFixedPostForm'));
|
2023-03-04 03:34:54 +02:00
|
|
|
const showFixedPostFormInChannel = computed(defaultStore.makeGetterSetter('showFixedPostFormInChannel'));
|
2022-06-30 04:53:40 +03:00
|
|
|
const numberOfPageCache = computed(defaultStore.makeGetterSetter('numberOfPageCache'));
|
2022-05-04 04:13:51 +03:00
|
|
|
const instanceTicker = computed(defaultStore.makeGetterSetter('instanceTicker'));
|
|
|
|
const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfiniteScroll'));
|
|
|
|
const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu'));
|
|
|
|
const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars'));
|
|
|
|
const aiChanMode = computed(defaultStore.makeGetterSetter('aiChanMode'));
|
|
|
|
|
|
|
|
watch(lang, () => {
|
2023-01-07 03:13:02 +02:00
|
|
|
miLocalStorage.setItem('lang', lang.value as string);
|
|
|
|
miLocalStorage.removeItem('locale');
|
2022-05-04 04:13:51 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
watch(fontSize, () => {
|
|
|
|
if (fontSize.value == null) {
|
2023-01-07 03:13:02 +02:00
|
|
|
miLocalStorage.removeItem('fontSize');
|
2022-05-04 04:13:51 +03:00
|
|
|
} else {
|
2023-01-07 03:13:02 +02:00
|
|
|
miLocalStorage.setItem('fontSize', fontSize.value);
|
2022-05-04 04:13:51 +03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
watch(useSystemFont, () => {
|
|
|
|
if (useSystemFont.value) {
|
2023-01-07 03:13:02 +02:00
|
|
|
miLocalStorage.setItem('useSystemFont', 't');
|
2022-05-04 04:13:51 +03:00
|
|
|
} else {
|
2023-01-07 03:13:02 +02:00
|
|
|
miLocalStorage.removeItem('useSystemFont');
|
2022-05-04 04:13:51 +03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
watch([
|
|
|
|
lang,
|
|
|
|
fontSize,
|
|
|
|
useSystemFont,
|
|
|
|
enableInfiniteScroll,
|
|
|
|
squareAvatars,
|
|
|
|
aiChanMode,
|
|
|
|
showGapBetweenNotesInTimeline,
|
|
|
|
instanceTicker,
|
2022-06-20 11:38:49 +03:00
|
|
|
overridedDeviceKind,
|
2022-05-04 04:13:51 +03:00
|
|
|
], async () => {
|
|
|
|
await reloadAsk();
|
|
|
|
});
|
2020-10-17 14:12:00 +03:00
|
|
|
|
2022-06-20 11:38:49 +03:00
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.general,
|
2022-12-19 12:01:30 +02:00
|
|
|
icon: 'ti ti-adjustments',
|
2020-10-17 14:12:00 +03:00
|
|
|
});
|
|
|
|
</script>
|