Resolve #5850
This commit is contained in:
parent
b940da45af
commit
69802a9f00
|
@ -348,6 +348,7 @@ resetPassword: "パスワードをリセット"
|
||||||
newPasswordIs: "新しいパスワードは「{password}」です"
|
newPasswordIs: "新しいパスワードは「{password}」です"
|
||||||
post: "投稿"
|
post: "投稿"
|
||||||
posted: "投稿しました"
|
posted: "投稿しました"
|
||||||
|
autoReloadWhenDisconnected: "サーバー切断時に自動リロード"
|
||||||
|
|
||||||
_2fa:
|
_2fa:
|
||||||
registerDevice: "デバイスを登録"
|
registerDevice: "デバイスを登録"
|
||||||
|
|
|
@ -222,6 +222,10 @@ export default Vue.extend({
|
||||||
|
|
||||||
this.$root.stream.on('_disconnected_', () => {
|
this.$root.stream.on('_disconnected_', () => {
|
||||||
if (!this.disconnectedDialog) {
|
if (!this.disconnectedDialog) {
|
||||||
|
if (this.$store.state.device.autoReload) {
|
||||||
|
location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.disconnectedDialog = this.$root.dialog({
|
this.disconnectedDialog = this.$root.dialog({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
<mk-button primary :disabled="$store.state.settings.wallpaper == null" @click="delWallpaper()">{{ $t('removeWallpaper') }}</mk-button>
|
<mk-button primary :disabled="$store.state.settings.wallpaper == null" @click="delWallpaper()">{{ $t('removeWallpaper') }}</mk-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="_content">
|
<div class="_content">
|
||||||
|
<mk-switch v-model="autoReload">
|
||||||
|
{{ $t('autoReloadWhenDisconnected') }}
|
||||||
|
</mk-switch>
|
||||||
<mk-switch v-model="$store.state.i.autoWatch" @change="onChangeAutoWatch">
|
<mk-switch v-model="$store.state.i.autoWatch" @change="onChangeAutoWatch">
|
||||||
{{ $t('auto-watch') }}<template #desc>{{ $t('auto-watch-desc') }}</template>
|
{{ $t('auto-watch') }}<template #desc>{{ $t('auto-watch-desc') }}</template>
|
||||||
</mk-switch>
|
</mk-switch>
|
||||||
|
@ -52,6 +55,11 @@ export default Vue.extend({
|
||||||
get() { return this.$store.state.settings.wallpaper; },
|
get() { return this.$store.state.settings.wallpaper; },
|
||||||
set(value) { this.$store.dispatch('settings/set', { key: 'wallpaper', value }); }
|
set(value) { this.$store.dispatch('settings/set', { key: 'wallpaper', value }); }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
autoReload: {
|
||||||
|
get() { return this.$store.state.device.autoReload; },
|
||||||
|
set(value) { this.$store.commit('device/set', { key: 'autoReload', value }); }
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -22,6 +22,7 @@ const defaultDeviceSettings = {
|
||||||
loadRawImages: false,
|
loadRawImages: false,
|
||||||
alwaysShowNsfw: false,
|
alwaysShowNsfw: false,
|
||||||
useOsDefaultEmojis: false,
|
useOsDefaultEmojis: false,
|
||||||
|
autoReload: false,
|
||||||
accounts: [],
|
accounts: [],
|
||||||
recentEmojis: [],
|
recentEmojis: [],
|
||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
|
|
Loading…
Reference in New Issue