Skip to content

Commit 0786ad9

Browse files
Gustav ÖrtenbergGustav Örtenberg
authored andcommitted
Fix #52
1 parent 6212775 commit 0786ad9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

games-vue-client/src/components/games/Hanabi.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
<h2>Actions</h2>
9494

9595
</v-row>
96+
<v-snackbar v-model="snackbar">
97+
{{text}}
98+
</v-snackbar>
9699
</v-container>
97100
</template>
98101
<script>
@@ -112,9 +115,22 @@ export default {
112115
this.onAction(action, index);
113116
}
114117
},
118+
watch: {
119+
deckEmpty: function (val) {
120+
this.snackbar = val
121+
}
122+
},
123+
data: () => ({
124+
snackbar: false,
125+
timeout: 5000,
126+
text: 'Last round',
127+
}),
115128
computed: {
116129
myTurn() {
117130
return this.view.currentPlayer == this.view.hand.index
131+
},
132+
deckEmpty() {
133+
return this.view.cardsLeft == 0
118134
}
119135
}
120136
};

0 commit comments

Comments
 (0)