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(); + } + } });