diff --git a/src/components/TownSquare.vue b/src/components/TownSquare.vue index efedfd3..4166f0d 100644 --- a/src/components/TownSquare.vue +++ b/src/components/TownSquare.vue @@ -23,9 +23,12 @@ ></Player> </ul> - <div class="st-reveal" v-if="session.revealedGrimoire !== null"> - <div class="button" v-if="players.length" @click="applyRevealedGrimoire"> - Reveal storyteller grimoire? + <div class="button-group st-reveal" v-if="session.revealedGrimoire !== null"> + <div class="button" @click="applyRevealedGrimoire"> + Reveal grimoire + </div> + <div class="button" @click="dismissRevealedGrimoire"> + Dismiss </div> </div> <div @@ -259,6 +262,9 @@ export default { }, applyRevealedGrimoire() { this.$store.commit("updateGameState", this.session.revealedGrimoire); + }, + dismissRevealedGrimoire() { + this.$store.commit("session/setRevealedGrimoire", null); } } }; @@ -652,7 +658,8 @@ export default { .st-reveal { position: absolute; margin: 0 auto; - bottom: 30%; + bottom: 35%; + z-index: 10; } #townsquare:not(.spectator) .fabled ul li:hover .token:before { diff --git a/src/store/index.js b/src/store/index.js index 79d579b..414750c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -306,35 +306,35 @@ export default new Vuex.Store({ }); } }); - if (!isLightweight) { - this.commit("toggleNight", !!isNight); - this.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed); - if (nomination !== -1) { - this.commit("session/nomination", { - nomination, - votes, - votingSpeed, - lockedVote, - isVoteInProgress - }); - } - this.commit("session/setMarkedPlayer", markedPlayer); - this.commit("players/setFabled", { - fabled: fabled.map(f => state.fabled.get(f.id) || f) + if (isLightweight) return; + // townsquare + this.commit("toggleNight", !!isNight); + this.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed); + if (nomination !== -1) { + this.commit("session/nomination", { + nomination, + votes, + votingSpeed, + lockedVote, + isVoteInProgress }); - // bluffs - if (bluffs !== -1) { - bluffs.forEach((bluff, i) => { - const role = - this.state.roles.get(bluff.roleId) || - this.getters.rolesJSONbyId.get(bluff.roleId) || - {}; - this.commit("players/setBluff", { - index: i, - role - }); + } + this.commit("session/setMarkedPlayer", markedPlayer); + this.commit("players/setFabled", { + fabled: fabled.map(f => state.fabled.get(f.id) || f) + }); + // bluffs + if (bluffs !== -1) { + bluffs.forEach((bluff, i) => { + const role = + this.state.roles.get(bluff.roleId) || + this.getters.rolesJSONbyId.get(bluff.roleId) || + {}; + this.commit("players/setBluff", { + index: i, + role }); - } + }); } if (isRevealedGrimoire) { this.commit("session/setRevealedGrimoire", null);