リロード確認ダイアログ表示

This commit is contained in:
syuilo 2020-12-28 17:18:13 +09:00
parent 948a65bf39
commit 1157298eb8

View file

@ -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();
}
}
});
</script>