debug panel now optional

This commit is contained in:
Settel 2021-10-01 16:53:31 +02:00
parent b24f222533
commit 748d6991a4

View File

@ -15,7 +15,7 @@
<Final v-if="gameState === 'final'" /> <Final v-if="gameState === 'final'" />
</div> </div>
</div> </div>
<div class="page-play__container-debug"> <div v-if="showDebugPanel" class="page-play__container-debug">
<EngineDebug /> <EngineDebug />
</div> </div>
</div> </div>
@ -31,6 +31,13 @@ export default {
await this.$engine.stop() await this.$engine.stop()
}, },
computed: { computed: {
showDebugPanel() {
const user = this.$store.state.engine.user
if (this.$route.query && this.$route.query.debug) {
return true
}
return user && ['gamemaster', 'admin'].indexOf(user.role) != -1
},
gameState() { gameState() {
return this.$store.state.game.state return this.$store.state.game.state
}, },