From c573908a5021c9bb36d5df37a3a76cfb7606ca2f Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 25 Jan 2021 20:29:20 +0000 Subject: [PATCH 1/5] adding case to hotkeys switch statement for "s" to switch between day and night mode --- src/App.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.vue b/src/App.vue index 63c5772..4c8a836 100644 --- a/src/App.vue +++ b/src/App.vue @@ -107,6 +107,10 @@ export default { this.$store.commit("toggleModal", "voteHistory"); } break; + case "s": + if (this.session.isSpectator) return; + this.$store.commit("toggleNight"); + break; case "escape": this.$store.commit("toggleModal"); } From 2515dcc328b9174e1994415a17a086d85593f72f Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 25 Jan 2021 20:30:17 +0000 Subject: [PATCH 2/5] changing menu item for toggle night mode to list the new hotkey for user reference --- src/components/Menu.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 3e02702..79715a5 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -43,10 +43,7 @@
  • - + [S]
  • Night order From 1670011a95e0c0c8b380d799caea72cfa9ee4caa Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 27 Jan 2021 17:27:36 +0000 Subject: [PATCH 3/5] removing sun from font awesome import as it is no longer being used anywhere, --- src/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.js b/src/main.js index a89be35..d755fc4 100644 --- a/src/main.js +++ b/src/main.js @@ -34,7 +34,6 @@ const faIcons = [ "SearchMinus", "SearchPlus", "Square", - "Sun", "TheaterMasks", "Times", "TimesCircle", From 8aa6f6b7f870bf59a507900c8749d22b66d8a948 Mon Sep 17 00:00:00 2001 From: Steffen Date: Wed, 27 Jan 2021 21:40:36 +0100 Subject: [PATCH 4/5] highlight dead players on night order sheet (closes #106) --- CHANGELOG.md | 6 ++ src/components/modals/NightOrderModal.vue | 71 ++++++++++++----------- src/components/modals/ReferenceModal.vue | 13 +---- 3 files changed, 47 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cd3ec8..5afd997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release Notes +## Version 2.6.0 +- night mode can be toggeled with [S] now (thanks @davotronic5000) +- night order shows which players are dead + +--- + ## Version 2.5.0 - all travelers from the base editions are now optionally available (thanks @davotronic5000) - night order shows player names near roles now diff --git a/src/components/modals/NightOrderModal.vue b/src/components/modals/NightOrderModal.vue index f74a673..a572cfa 100644 --- a/src/components/modals/NightOrderModal.vue +++ b/src/components/modals/NightOrderModal.vue @@ -24,13 +24,18 @@ :class="[role.team]" > - {{ role.name }}
    - {{ - players - .filter(p => p.role.id === role.id) - .map(p => p.name) - .join(", ") - }} + {{ role.name }} +
    - {{ role.name }}
    - {{ - players - .filter(p => p.role.id === role.id) - .map(p => p.name) - .join(", ") - }} + {{ role.name }} +
  • @@ -80,11 +90,6 @@ export default { components: { Modal }, - data: function() { - return { - roleSelection: {} - }; - }, computed: { rolesFirstNight: function() { const rolesFirstNight = []; @@ -95,23 +100,22 @@ export default { id: "evil", name: "Minion info", firstNight: 2, - team: "minion" + team: "minion", + players: this.players.filter(p => p.role.team === "minion") }, { id: "evil", name: "Demon info & bluffs", firstNight: 4, - team: "demon" + team: "demon", + players: this.players.filter(p => p.role.team === "demon") } ); } this.roles.forEach(role => { - if ( - role.firstNight && - (role.team !== "traveler" || - this.players.some(p => p.role.id === role.id)) - ) { - rolesFirstNight.push(role); + const players = this.players.filter(p => p.role.id === role.id); + if (role.firstNight && (role.team !== "traveler" || players.length)) { + rolesFirstNight.push(Object.assign({ players }, role)); } }); this.fabled @@ -125,12 +129,9 @@ export default { rolesOtherNight: function() { const rolesOtherNight = []; this.roles.forEach(role => { - if ( - role.otherNight && - (role.team !== "traveler" || - this.players.some(p => p.role.id === role.id)) - ) { - rolesOtherNight.push(role); + const players = this.players.filter(p => p.role.id === role.id); + if (role.otherNight && (role.team !== "traveler" || players.length)) { + rolesOtherNight.push(Object.assign({ players }, role)); } }); this.fabled @@ -260,6 +261,10 @@ ul { border-right: 1px solid rgba(255, 255, 255, 0.4); small { color: #888; + margin-right: 5px; + &.dead { + text-decoration: line-through; + } } } } diff --git a/src/components/modals/ReferenceModal.vue b/src/components/modals/ReferenceModal.vue index 29163a6..eb51185 100644 --- a/src/components/modals/ReferenceModal.vue +++ b/src/components/modals/ReferenceModal.vue @@ -56,11 +56,6 @@ export default { components: { Modal }, - data: function() { - return { - roleSelection: {} - }; - }, computed: { rolesGrouped: function() { const rolesGrouped = {}; @@ -136,7 +131,6 @@ h4 { .townsfolk { .name, - .player, h4 { color: $townsfolk; &:before, @@ -147,7 +141,6 @@ h4 { } .outsider { .name, - .player, h4 { color: $outsider; &:before, @@ -158,7 +151,6 @@ h4 { } .minion { .name, - .player, h4 { color: $minion; &:before, @@ -169,7 +161,6 @@ h4 { } .demon { .name, - .player, h4 { color: $demon; &:before, @@ -208,7 +199,6 @@ ul { width: 15%; font-weight: bold; text-align: right; - font-family: "Papyrus", sans-serif; font-size: 110%; } .player { @@ -216,6 +206,8 @@ ul { flex-shrink: 1; text-align: right; margin: 0 10px; + color: #888; + font-size: smaller; } .ability { flex-grow: 1; @@ -230,6 +222,7 @@ ul { height: auto; font-family: inherit; font-size: inherit; + color: #fff; } .icon:after { padding-top: 0; From 7b301ffa731fa4e65d3a97b633331bb721d0dba0 Mon Sep 17 00:00:00 2001 From: Steffen Date: Wed, 27 Jan 2021 22:04:49 +0100 Subject: [PATCH 5/5] 2.6.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 248249e..55e9914 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "townsquare", - "version": "2.5.0", + "version": "2.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f019b82..4b379d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "townsquare", - "version": "2.5.0", + "version": "2.6.0", "description": "Blood on the Clocktower Town Square", "author": "Steffen Baumgart", "scripts": {