From b9b9e59b536068feb78d71b32efe7f05aa736b01 Mon Sep 17 00:00:00 2001 From: nicfreeman1209 Date: Wed, 5 May 2021 07:58:13 +0100 Subject: [PATCH] requested changes --- src/App.vue | 2 +- src/components/Menu.vue | 23 +---------- src/components/modals/VoteHistoryModal.vue | 45 +++++++++++++++++++++- src/store/modules/session.js | 16 ++------ src/store/socket.js | 25 ++++++------ 5 files changed, 64 insertions(+), 47 deletions(-) diff --git a/src/App.vue b/src/App.vue index bb5bc65..7f17766 100644 --- a/src/App.vue +++ b/src/App.vue @@ -110,7 +110,7 @@ export default { this.$store.commit("toggleModal", "roles"); break; case "v": - if (this.session.voteHistory.length) { + if (this.session.voteHistory.length || !this.session.isSpectator) { this.$store.commit("toggleModal", "voteHistory"); } break; diff --git a/src/components/Menu.vue b/src/components/Menu.vue index d39239a..bf792a1 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -132,26 +132,11 @@
  • Vote history[V]
  • -
  • - Permit vote history - - - -
  • -
  • - Clear vote history - -
  • Leave Session {{ session.sessionId }} @@ -343,12 +328,6 @@ export default { this.$store.dispatch("players/clearRoles"); } }, - clearVoteHistory() { - this.$store.commit("session/clearVoteHistory"); - }, - toggleRecordVoteHistory() { - this.$store.commit("session/toggleRecordVoteHistory"); - }, ...mapMutations([ "toggleGrimoire", "toggleMenu", diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index 95eeaa8..ce3b0ef 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -1,7 +1,7 @@