Add object reminder for spirits
This commit is contained in:
parent
db027cde77
commit
28065831c4
2 changed files with 53 additions and 0 deletions
47
web/src/components/ObjectReminder.vue
Normal file
47
web/src/components/ObjectReminder.vue
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
<template>
|
||||||
|
<div id="ObjectReminder">
|
||||||
|
<span class="text">
|
||||||
|
Object:
|
||||||
|
<br>
|
||||||
|
{{ targetObject }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: `ObjectReminder`,
|
||||||
|
components: {},
|
||||||
|
computed: {
|
||||||
|
targetObject() {
|
||||||
|
return this.$store.state.chosen_object;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
@import "../css/theme.css";
|
||||||
|
@import "../css/style.css";
|
||||||
|
|
||||||
|
#ObjectReminder {
|
||||||
|
background-color: var(--background3);
|
||||||
|
color: var(--background3-text);
|
||||||
|
border-radius: 100% 0 0 0;
|
||||||
|
height: var(--size);
|
||||||
|
width: var(--size);
|
||||||
|
position: fixed;
|
||||||
|
--size: 120px;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
font-size: large;
|
||||||
|
bottom: 30px;
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -5,10 +5,12 @@
|
||||||
<player-hand />
|
<player-hand />
|
||||||
<team-reminder />
|
<team-reminder />
|
||||||
<discard-hand v-if="isGuesser" />
|
<discard-hand v-if="isGuesser" />
|
||||||
|
<object-reminder v-else-if="isWriter && objectChosen" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ObjectReminder from "../components/ObjectReminder";
|
||||||
import DiscardHand from "../components/DiscardHandButton";
|
import DiscardHand from "../components/DiscardHandButton";
|
||||||
import ObjectSelector from "../components/ChooseObject";
|
import ObjectSelector from "../components/ChooseObject";
|
||||||
import TeamReminder from "../components/TeamReminder";
|
import TeamReminder from "../components/TeamReminder";
|
||||||
|
|
@ -23,11 +25,15 @@ export default {
|
||||||
"discard-hand": DiscardHand,
|
"discard-hand": DiscardHand,
|
||||||
"player-hand": PlayerHand,
|
"player-hand": PlayerHand,
|
||||||
"game-board": GameBoard,
|
"game-board": GameBoard,
|
||||||
|
"object-reminder": ObjectReminder
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isGuesser() {
|
isGuesser() {
|
||||||
return this.$store.state.role === this.$store.state.guesser_name;
|
return this.$store.state.role === this.$store.state.guesser_name;
|
||||||
},
|
},
|
||||||
|
isWriter() {
|
||||||
|
return this.$store.state.role === this.$store.state.writer_name;
|
||||||
|
},
|
||||||
objectChosen() {
|
objectChosen() {
|
||||||
return this.$store.state.chosen_object != null;
|
return this.$store.state.chosen_object != null;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue