requested changes

This commit is contained in:
nicfreeman1209 2021-05-05 20:06:23 +01:00
parent 5aba663403
commit 19ad2adc17
2 changed files with 30 additions and 30 deletions

View File

@ -8,35 +8,28 @@
@click="clearVoteHistory" @click="clearVoteHistory"
icon="trash-alt" icon="trash-alt"
class="clear" class="clear"
title="Clear history" title="Clear vote history"
v-if="session.isSpectator" v-if="session.isSpectator"
/> />
<h3>Nomination history</h3> <h3>Vote history</h3>
<template v-if="!session.isSpectator"> <template v-if="!session.isSpectator">
<table> <div class="options">
<tr> <div class="option" @click="setRecordVoteHistory">
<td class="option"> <font-awesome-icon
<div class="option" @click="setRecordVoteHistory"> :icon="[
<font-awesome-icon 'fas',
:icon="[ session.isVoteHistoryAllowed ? 'check-square' : 'square'
'fas', ]"
session.isVoteHistoryAllowed ? 'check-square' : 'square' />
]" Accessible to players
/> </div>
Allow players to view this? <div class="option" @click="clearVoteHistory">
</div> <font-awesome-icon icon="trash-alt" />
</td> Clear for everyone
<td></td> </div>
<td> </div>
<div class="option" @click="clearVoteHistory">
<font-awesome-icon icon="trash-alt" />
Clear players vote histories
</div>
</td>
</tr>
</table>
</template> </template>
<table> <table>
<thead> <thead>
@ -114,8 +107,7 @@ export default {
!this.session.isVoteHistoryAllowed !this.session.isVoteHistoryAllowed
); );
}, },
...mapMutations(["toggleModal"]), ...mapMutations(["toggleModal"])
...mapMutations("session", ["clearVoteHistory"])
} }
}; };
</script> </script>
@ -133,11 +125,21 @@ export default {
} }
} }
.options {
display: flex;
justify-content: center;
align-items: center;
justify-content: center;
align-content: center;
}
.option { .option {
color: white; color: white;
text-decoration: none; text-decoration: none;
margin: 0 15px 0 15px;
&:hover { &:hover {
color: red; color: red;
cursor: pointer;
} }
} }

View File

@ -175,6 +175,7 @@ class LiveSession {
case "isVoteHistoryAllowed": case "isVoteHistoryAllowed":
if (!this._isSpectator) return; if (!this._isSpectator) return;
this._store.commit("session/setVoteHistoryAllowed", params); this._store.commit("session/setVoteHistoryAllowed", params);
this._store.commit("session/clearVoteHistory");
break; break;
case "votingSpeed": case "votingSpeed":
if (!this._isSpectator) return; if (!this._isSpectator) return;
@ -346,10 +347,7 @@ class LiveSession {
}); });
if (!isLightweight) { if (!isLightweight) {
this._store.commit("toggleNight", !!isNight); this._store.commit("toggleNight", !!isNight);
this._store.commit( this._store.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed);
"session/setVoteHistoryAllowed",
isVoteHistoryAllowed
);
this._store.commit("session/nomination", { this._store.commit("session/nomination", {
nomination, nomination,
votes, votes,