add dismiss button

This commit is contained in:
nicfreeman1209 2021-05-11 17:58:41 +01:00
parent ef8aef2d2a
commit 4cc4f908d8
2 changed files with 38 additions and 31 deletions

View file

@ -23,9 +23,12 @@
></Player> ></Player>
</ul> </ul>
<div class="st-reveal" v-if="session.revealedGrimoire !== null"> <div class="button-group st-reveal" v-if="session.revealedGrimoire !== null">
<div class="button" v-if="players.length" @click="applyRevealedGrimoire"> <div class="button" @click="applyRevealedGrimoire">
Reveal storyteller grimoire? Reveal grimoire
</div>
<div class="button" @click="dismissRevealedGrimoire">
Dismiss
</div> </div>
</div> </div>
<div <div
@ -259,6 +262,9 @@ export default {
}, },
applyRevealedGrimoire() { applyRevealedGrimoire() {
this.$store.commit("updateGameState", this.session.revealedGrimoire); this.$store.commit("updateGameState", this.session.revealedGrimoire);
},
dismissRevealedGrimoire() {
this.$store.commit("session/setRevealedGrimoire", null);
} }
} }
}; };
@ -652,7 +658,8 @@ export default {
.st-reveal { .st-reveal {
position: absolute; position: absolute;
margin: 0 auto; margin: 0 auto;
bottom: 30%; bottom: 35%;
z-index: 10;
} }
#townsquare:not(.spectator) .fabled ul li:hover .token:before { #townsquare:not(.spectator) .fabled ul li:hover .token:before {

View file

@ -306,7 +306,8 @@ export default new Vuex.Store({
}); });
} }
}); });
if (!isLightweight) { if (isLightweight) return;
// townsquare
this.commit("toggleNight", !!isNight); this.commit("toggleNight", !!isNight);
this.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed); this.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed);
if (nomination !== -1) { if (nomination !== -1) {
@ -335,7 +336,6 @@ export default new Vuex.Store({
}); });
}); });
} }
}
if (isRevealedGrimoire) { if (isRevealedGrimoire) {
this.commit("session/setRevealedGrimoire", null); this.commit("session/setRevealedGrimoire", null);
} }