diff options
author | Mark Powers <markppowers0@gmail.com> | 2020-04-19 17:23:01 -0500 |
---|---|---|
committer | Mark Powers <markppowers0@gmail.com> | 2020-04-19 17:23:01 -0500 |
commit | acf13b3af04791124d0d8cb31292505c5edf131a (patch) | |
tree | 7a087b0b2f0bb22c94d704fa16a253851fe0d388 /src/quiz-bunny/index.html | |
parent | d4878655be6ae6b88bdffc1afe2ff953119b7916 (diff) |
Add improvements to quiz bunny
Diffstat (limited to 'src/quiz-bunny/index.html')
-rw-r--r-- | src/quiz-bunny/index.html | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/quiz-bunny/index.html b/src/quiz-bunny/index.html index 127db65..9b0a6db 100644 --- a/src/quiz-bunny/index.html +++ b/src/quiz-bunny/index.html @@ -20,14 +20,14 @@ </h1> <div> <div> - <input style="width: 340px;" type="text" placeholder="username" v-model="username"> + <input style="width: 390px;" type="text" placeholder="username" v-model="username"> </div> <div> <input style="width: 100%;" type="button" value="Host game" v-on:click="hostGame" :disabled="username.length == 0"> </div> <div> - <input type="text" placeholder="game code" v-model="gameCode" style="width: 250px;" + <input type="text" placeholder="game code" v-model="gameCode" style="width: 300px;" v-on:keyup.enter="joinGame"> <input type="button" value="Join game" v-on:click="joinGame" :disabled="username.length == 0 || gameCode.length == 0"> @@ -47,6 +47,7 @@ </div> </div> <div v-else> + <h1>{{game.round+1}}/{{game.maxRound}}</h1> <div v-if="game.state == STATES.TYPING" class="typing"> <h1>Answer:</h1> <h2>{{game.prompt}}</h2> @@ -82,9 +83,20 @@ <div v-if="game.state == STATES.WAITING" class="waiting"> <h1>Results:</h1> <h2>{{game.prompt}}</h2> - <div v-for="(answer, i) in game.answers"> - <span>{{answer.text}}</span><span>{{answer.voteCount}} votes</span> - </div> + <table> + <tr> + <th>Answer</th> + <th>Author</th> + <th>Votes</th> + <th>Endorsements</th> + </tr> + <tr v-for="(answer, i) in game.answers"> + <td>{{answer.text}}</td> + <td>{{answer.name}}</td> + <td>{{answer.voteCount}}</td> + <td><p v-for="name in answer.voteNames">{{name}}</p></td> + </tr> + </table> <input type="button" value="Ready" v-on:click="ready" :disabled="game.ready"> <div class="readyList"> <h4>Waiting:</h4> |