mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 17:36:43 -06:00
リロード確認ダイアログ表示
This commit is contained in:
parent
948a65bf39
commit
1157298eb8
1 changed files with 22 additions and 4 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue