mirror of https://github.com/bra1n/townsquare.git
fix vote timer (closes #22)
This commit is contained in:
parent
a88cb45fb1
commit
080b1314ad
|
@ -85,6 +85,7 @@ export default {
|
|||
methods: {
|
||||
start() {
|
||||
this.$store.commit("session/lockVote");
|
||||
clearInterval(this.voteTimer);
|
||||
this.voteTimer = setInterval(() => {
|
||||
this.$store.commit("session/lockVote");
|
||||
if (this.session.lockedVote > this.players.length) {
|
||||
|
@ -93,10 +94,11 @@ export default {
|
|||
}, 3000);
|
||||
},
|
||||
stop() {
|
||||
this.$store.commit("session/lockVote", 0);
|
||||
clearInterval(this.voteTimer);
|
||||
this.$store.commit("session/lockVote", 0);
|
||||
},
|
||||
finish() {
|
||||
clearInterval(this.voteTimer);
|
||||
this.$store.commit("session/nomination", false);
|
||||
},
|
||||
vote(vote) {
|
||||
|
|
|
@ -176,6 +176,7 @@ class LiveSession {
|
|||
* Update the gamestate based on incoming data.
|
||||
* @param gamestate
|
||||
* @param edition
|
||||
* @param nomination
|
||||
* @private
|
||||
*/
|
||||
_updateGamestate({ gamestate, edition, nomination }) {
|
||||
|
|
Loading…
Reference in New Issue