diff --git a/client/src/pages/play.vue b/client/src/pages/play.vue index 2acbf0a..eb8dc15 100644 --- a/client/src/pages/play.vue +++ b/client/src/pages/play.vue @@ -45,7 +45,7 @@ export default { return this.$store.state.game.phase }, connectionLost() { - return this.$store.state.engine.version == -1 + return this.$engine.isActive && this.$store.state.engine.version == -1 }, }, methods: { diff --git a/client/src/plugins/engine/start.js b/client/src/plugins/engine/start.js index 31c0d8a..ef931f5 100644 --- a/client/src/plugins/engine/start.js +++ b/client/src/plugins/engine/start.js @@ -10,6 +10,12 @@ export default async function() { return } + const role = store.state.engine.user?.role || '' + if (role === 'admin') { + console.debug('user is admin, engine not started') + return + } + this.isActive = true this.fetchUpdate() console.debug('engine started')