feat: disable game controls while in admin interface

This commit is contained in:
Settel 2022-03-16 08:54:35 +01:00
parent 46ec4305ad
commit c90fabf022

View File

@ -1,13 +1,18 @@
<template> <template>
<nav v-if="isGamemaster" class="gamecontrols"> <nav v-if="isGamemaster" class="gamecontrols">
<div v-if="$route.path != '/admin'">
<button @click="go('/admin')">admin interface</button>
<button :disabled="buttonsDisabled.collect" @click="collectQuotes">Collect Quotes</button> <button :disabled="buttonsDisabled.collect" @click="collectQuotes">Collect Quotes</button>
<button :disabled="buttonsDisabled.start" @click="startGame">Start</button> <button :disabled="buttonsDisabled.start" @click="startGame">Start</button>
<button :disabled="buttonsDisabled.continue" @click="continueGame">Continue</button> <button :disabled="buttonsDisabled.continue" @click="continueGame">Continue</button>
<button :disabled="buttonsDisabled.idle" @click="resetGame">Idle</button> <button :disabled="buttonsDisabled.idle" @click="resetGame">Idle</button>
<button :disabled="buttonsDisabled.finish" @click="finishGame">Finish Game</button> <button :disabled="buttonsDisabled.finish" @click="finishGame">Finish Game</button>
<button v-if="$route.path != '/play'" @click="go('/play')">switch to game</button>
<button v-if="$route.path != '/admin'" @click="go('/admin')">admin interface</button>
<button class="button-logout" @click="logout">logout</button> <button class="button-logout" @click="logout">logout</button>
</div>
<div v-if="$route.path != '/play'">
<button @click="go('/play')">back to game</button>
<button class="button-logout" @click="logout">logout</button>
</div>
</nav> </nav>
</template> </template>