hide stats if room is not running.

This commit is contained in:
Miroslav Šedivý
2022-08-05 18:08:07 +02:00
parent 204300ff8a
commit 65d4a2b1a2
+5 -3
View File
@@ -69,7 +69,7 @@
</v-simple-table>
</v-col>
</v-row>
<template v-if="statsErr">
<template v-if="statsErr && room.running">
<v-alert
border="left"
type="info"
@@ -89,7 +89,7 @@
</template>
<div class="text-center mt-3">
<v-btn @click="LoadStats" :loading="statsLoading">Reload</v-btn>
<v-btn @click="LoadStats" :loading="statsLoading" :disabled="!room.running">Reload</v-btn>
</div>
<div class="my-3 headline">Main settings</div>
@@ -241,7 +241,9 @@ export default class RoomInfo extends Vue {
try {
this.settings = await this.$store.dispatch('ROOMS_SETTINGS', roomId)
this.LoadStats()
if (this.room.running) {
this.LoadStats()
}
} catch(e) {
if (e.response) {
this.$swal({