From 1157298eb89694b34e274e948789e0ddf9099b03 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 28 Dec 2020 17:18:13 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=83=AD=E3=83=BC=E3=83=89=E7=A2=BA?= =?UTF-8?q?=E8=AA=8D=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD=E3=82=B0=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/pages/settings/general.vue | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/client/pages/settings/general.vue b/src/client/pages/settings/general.vue index 5d79b693f9..6d9ef8a3e2 100644 --- a/src/client/pages/settings/general.vue +++ b/src/client/pages/settings/general.vue @@ -94,6 +94,7 @@ import MkLink from '@/components/link.vue'; import { langs } from '@/config'; import { defaultStore } from '@/store'; import { ColdDeviceStorage } from '@/store'; +import * as os from '@/os'; export default defineComponent({ components: { @@ -146,7 +147,7 @@ export default defineComponent({ lang() { localStorage.setItem('lang', this.lang); localStorage.removeItem('locale'); - location.reload(); + this.reloadAsk(); }, fontSize() { @@ -155,7 +156,7 @@ export default defineComponent({ } else { localStorage.setItem('fontSize', this.fontSize); } - location.reload(); + this.reloadAsk(); }, useSystemFont() { @@ -164,16 +165,33 @@ export default defineComponent({ } else { localStorage.removeItem('useSystemFont'); } - location.reload(); + this.reloadAsk(); }, enableInfiniteScroll() { - location.reload() + this.reloadAsk(); + }, + + showGapBetweenNotesInTimeline() { + this.reloadAsk(); }, }, mounted() { this.$emit('info', this.INFO); }, + + methods: { + async reloadAsk() { + const { canceled } = await os.dialog({ + type: 'info', + text: this.$ts.reloadToApplySetting, + showCancelButton: true + }); + if (canceled) return; + + location.reload(); + } + } });