From 2717b69ea24ff36d2eb324237e20295e9d5c68f3 Mon Sep 17 00:00:00 2001 From: Jul Gvoz Date: Mon, 4 Jan 2021 19:00:24 +0200 Subject: [PATCH 1/6] voting, majority & passed clarified (closes #82) --- src/components/modals/VoteHistoryModal.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index a8f08f0..df43c1d 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -18,8 +18,9 @@ Nominator Nominee Type - Majority + Votes Hand up + Passed @@ -27,12 +28,14 @@ {{ vote.nominator }} {{ vote.nominee }} {{ vote.type }} - {{ vote.majority }} + {{ vote.votes.length }} / {{ vote.majority }} - {{ vote.votes.length }} {{ vote.votes.join(", ") }} + + + @@ -98,5 +101,8 @@ tbody { td:nth-child(4) { text-align: center; } + td:nth-child(6) { + text-align: center; + } } From 873083b8d1a6decc5e6256a844a85a8e9c5da650 Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 7 Jan 2021 20:12:38 +0100 Subject: [PATCH 2/6] 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 3/6] 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 4/6] 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 5/6] 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 }} From 7396a4574e8fba360000f977db9534a17751bb75 Mon Sep 17 00:00:00 2001 From: Jul Gvoz Date: Sat, 9 Jan 2021 00:46:34 +0200 Subject: [PATCH 6/6] Clearer majority representation --- src/components/modals/VoteHistoryModal.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index df43c1d..ae2d7e1 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,18 @@ {{ vote.nominator }} {{ vote.nominee }} {{ vote.type }} - {{ vote.votes.length }} / {{ vote.majority }} + {{ vote.votes.length }} {{ vote.votes.join(", ") }} - + +