Skip to content

Commit

Permalink
add timer to voting screen
Browse files Browse the repository at this point in the history
  • Loading branch information
OtherwiseJunk committed Apr 30, 2024
1 parent add2f63 commit 1238aa6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Yak/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ function onNextRound(){
<AnswerSubmission :timeRemaining="roundTimeRemaining" :acronym="acronym" v-if="phase === 1 && animationComplete" @submit="(answer) => onSubmit(answer)">
</AnswerSubmission>
<VotingScreen
:submissionsByUserId="submissions"
:submissionsByUserId="submissions"
:resultsMode="phase === 3"
:skipVoting="playerCount <= 2"
:timeRemaining="roundTimeRemaining"
v-if="(phase === 2 || phase === 3) && animationComplete"
@vote="(submissionUserId) => onVote(submissionUserId)"
@next-round="onNextRound()">
Expand Down
6 changes: 5 additions & 1 deletion Yak/src/components/VotingScreen.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="container">
<div class="header">
<p class="font header-text">{{ props.resultsMode ? "Results" : "Vote" }}</p>
<p class="font header-text">{{ props.resultsMode ? "Results" : `Vote - ${props.timeRemaining}` }}</p>
<p v-show="props.skipVoting" class="font header-subtext">voting skipped as there aren't enough players</p>
</div>
<div class="voting-container">
Expand Down Expand Up @@ -51,6 +51,10 @@ const props = defineProps({
skipVoting: {
type: Boolean,
required: true
},
timeRemaining: {
type: Number,
required: true
}
})
const emits = defineEmits(['vote', 'next-round'])
Expand Down

0 comments on commit 1238aa6

Please sign in to comment.