debug panel now optional
This commit is contained in:
parent
b24f222533
commit
748d6991a4
@ -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
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user