Detect if an object has been chosen and change the display if it hasn't.
This commit is contained in:
parent
e4be57e957
commit
dccb0f835f
1 changed files with 8 additions and 4 deletions
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<div id="GameView" class="maximize">
|
||||
<game-board />
|
||||
<game-board v-if="isGuesser || objectChosen" />
|
||||
<object-selector v-else />
|
||||
<player-hand />
|
||||
<team-reminder />
|
||||
<discard-hand
|
||||
v-if="isGuesser"
|
||||
/>
|
||||
<discard-hand v-if="isGuesser" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DiscardHand from "../components/DiscardHandButton";
|
||||
import ObjectSelector from "../components/ChooseObject";
|
||||
import TeamReminder from "../components/TeamReminder";
|
||||
import GameBoard from "../components/GameBoard";
|
||||
import PlayerHand from "../components/Hand";
|
||||
|
|
@ -18,6 +18,7 @@ import PlayerHand from "../components/Hand";
|
|||
export default {
|
||||
name: `InGame`,
|
||||
components: {
|
||||
"object-selector": ObjectSelector,
|
||||
"team-reminder": TeamReminder,
|
||||
"discard-hand": DiscardHand,
|
||||
"player-hand": PlayerHand,
|
||||
|
|
@ -27,6 +28,9 @@ export default {
|
|||
isGuesser() {
|
||||
return this.$store.state.role === this.$store.state.guesser_name;
|
||||
},
|
||||
objectChosen() {
|
||||
return this.$store.state.chosen_object != null;
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue