feat: role admin has no game assigned, so don't start engine, don't show error message

This commit is contained in:
Settel 2022-03-16 13:28:39 +01:00
parent 23fff2344f
commit 19bd6c3388
2 changed files with 7 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export default {
return this.$store.state.game.phase return this.$store.state.game.phase
}, },
connectionLost() { connectionLost() {
return this.$store.state.engine.version == -1 return this.$engine.isActive && this.$store.state.engine.version == -1
}, },
}, },
methods: { methods: {

View File

@ -10,6 +10,12 @@ export default async function() {
return return
} }
const role = store.state.engine.user?.role || ''
if (role === 'admin') {
console.debug('user is admin, engine not started')
return
}
this.isActive = true this.isActive = true
this.fetchUpdate() this.fetchUpdate()
console.debug('engine started') console.debug('engine started')