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-simple-table>
</v-col> </v-col>
</v-row> </v-row>
<template v-if="statsErr"> <template v-if="statsErr && room.running">
<v-alert <v-alert
border="left" border="left"
type="info" type="info"
@@ -89,7 +89,7 @@
</template> </template>
<div class="text-center mt-3"> <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>
<div class="my-3 headline">Main settings</div> <div class="my-3 headline">Main settings</div>
@@ -241,7 +241,9 @@ export default class RoomInfo extends Vue {
try { try {
this.settings = await this.$store.dispatch('ROOMS_SETTINGS', roomId) this.settings = await this.$store.dispatch('ROOMS_SETTINGS', roomId)
this.LoadStats() if (this.room.running) {
this.LoadStats()
}
} catch(e) { } catch(e) {
if (e.response) { if (e.response) {
this.$swal({ this.$swal({