diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-08-19 21:47:18 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-08-19 21:47:18 +0900 |
| commit | c34f302b1c91bd3b091cd03fa60fae86b385f902 (patch) | |
| tree | aff533d9acc24952c5bac0e3e190a117824f0a61 /src/client/components | |
| parent | enhance(client): Better element visible detection (diff) | |
| download | sharkey-c34f302b1c91bd3b091cd03fa60fae86b385f902.tar.gz sharkey-c34f302b1c91bd3b091cd03fa60fae86b385f902.tar.bz2 sharkey-c34f302b1c91bd3b091cd03fa60fae86b385f902.zip | |
enhance(client): サーバーから切断されたときにダイアログで警告を表示できるように
Diffstat (limited to 'src/client/components')
| -rw-r--r-- | src/client/components/stream-indicator.vue | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/client/components/stream-indicator.vue b/src/client/components/stream-indicator.vue index ec00f4cbfe..9005cb9a8b 100644 --- a/src/client/components/stream-indicator.vue +++ b/src/client/components/stream-indicator.vue @@ -1,5 +1,5 @@ <template> -<div class="nsbbhtug" v-if="hasDisconnected" @click="resetDisconnected"> +<div class="nsbbhtug" v-if="hasDisconnected && $store.state.device.serverDisconnectedBehavior === 'quiet'" @click="resetDisconnected"> <div>{{ $t('disconnectedFromServer') }}</div> <div class="command"> <button class="_textButton" @click="reload">{{ $t('reload') }}</button> @@ -23,21 +23,12 @@ export default Vue.extend({ }, }, created() { - this.$root.stream.on('_connected_', this.onConnected); this.$root.stream.on('_disconnected_', this.onDisconnected); }, beforeDestroy() { - this.$root.stream.off('_connected_', this.onConnected); this.$root.stream.off('_disconnected_', this.onDisconnected); }, methods: { - onConnected() { - if (this.hasDisconnected) { - if (this.$store.state.device.autoReload) { - this.reload(); - } - } - }, onDisconnected() { this.hasDisconnected = true; }, |