From 873083b8d1a6decc5e6256a844a85a8e9c5da650 Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 7 Jan 2021 20:12:38 +0100 Subject: [PATCH 1/4] clarity --- src/components/modals/VoteHistoryModal.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index df43c1d..e9ba001 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -20,7 +20,7 @@ Type Votes Hand up - Passed + Majority @@ -28,13 +28,17 @@ {{ vote.nominator }} {{ vote.nominee }} {{ vote.type }} - {{ vote.votes.length }} / {{ vote.majority }} + {{ vote.votes.length }} {{ vote.votes.join(", ") }} - + {{ vote.majority }} + From be89d51ae639e8910083eab6748735eab1ba7549 Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 7 Jan 2021 20:25:12 +0100 Subject: [PATCH 2/4] added vote time --- src/components/modals/VoteHistoryModal.vue | 29 +++++++++++++++------- src/store/modules/session.js | 2 +- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index e9ba001..4af0360 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -15,31 +15,42 @@ + - + + - +
Time Nominator Nominee Type Votes Hand up Majority + + Voters +
+ {{ vote.timestamp.getHours() }}:{{ vote.timestamp.getMinutes() }} + {{ vote.nominator }} {{ vote.nominee }} {{ vote.type }}{{ vote.votes.length }} - - {{ vote.votes.join(", ") }} + {{ vote.votes.length }} + {{ vote.majority }} + {{ vote.votes.join(", ") }} +
@@ -96,13 +107,13 @@ thead td { } tbody { - td:nth-child(1) { + td:nth-child(2) { color: $townsfolk; } - td:nth-child(2) { + td:nth-child(3) { color: $demon; } - td:nth-child(4) { + td:nth-child(5) { text-align: center; } td:nth-child(6) { diff --git a/src/store/modules/session.js b/src/store/modules/session.js index 152eba6..62dda3c 100644 --- a/src/store/modules/session.js +++ b/src/store/modules/session.js @@ -72,8 +72,8 @@ const mutations = { addHistory(state, players) { if (!state.nomination || state.lockedVote <= players.length) return; const isBanishment = players[state.nomination[1]].role.team === "traveler"; - console.log(isBanishment); state.voteHistory.push({ + timestamp: new Date(), nominator: players[state.nomination[0]].name, nominee: players[state.nomination[1]].name, type: isBanishment ? "Banishment" : "Execution", From 072cd4cb77384d12774eb46f070e3555182ef61f Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 7 Jan 2021 20:25:12 +0100 Subject: [PATCH 3/4] added vote time (closes #81) --- src/components/modals/VoteHistoryModal.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index 4af0360..7550e3f 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -30,7 +30,9 @@ - {{ vote.timestamp.getHours() }}:{{ vote.timestamp.getMinutes() }} + {{ vote.timestamp.getHours().padStart(2, "0") }}:{{ + vote.timestamp.getMinutes().padStart(2, "0") + }} {{ vote.nominator }} {{ vote.nominee }} From 5d932780cf9acd4e075bd856d99ad1e52f24af9d Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 7 Jan 2021 20:37:50 +0100 Subject: [PATCH 4/4] bugfix --- src/components/modals/VoteHistoryModal.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index 7550e3f..8295ea6 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -30,8 +30,8 @@ - {{ vote.timestamp.getHours().padStart(2, "0") }}:{{ - vote.timestamp.getMinutes().padStart(2, "0") + {{ vote.timestamp.getHours().toString().padStart(2, "0") }}:{{ + vote.timestamp.getMinutes().toString().padStart(2, "0") }} {{ vote.nominator }}