adding method and dialog to player vue to update player pronoun in state.

This commit is contained in:
Dave 2021-01-17 00:18:26 +00:00
parent cb45da4de4
commit ccd40ccc99
1 changed files with 10 additions and 0 deletions

View File

@ -112,6 +112,9 @@
<li @click="changeName"> <li @click="changeName">
<font-awesome-icon icon="user-edit" />Rename <font-awesome-icon icon="user-edit" />Rename
</li> </li>
<li @click="changePronoun">
<font-awesome-icon icon="" />Change Pronouns
</li>
<li v-if="!session.nomination" @click="nominatePlayer()"> <li v-if="!session.nomination" @click="nominatePlayer()">
<font-awesome-icon icon="hand-point-right" /> <font-awesome-icon icon="hand-point-right" />
Nomination Nomination
@ -230,6 +233,13 @@ export default {
handleEmojis: text => text.replace(/:([^: ]+?):/g, "").replace(/ •/g, "\n•") handleEmojis: text => text.replace(/:([^: ]+?):/g, "").replace(/ •/g, "\n•")
}, },
methods: { methods: {
changePronoun() {
if (this.session.isSpectator) return;
const pronoun =
prompt("Player preffered pronouns", this.player.pronoun) ||
this.player.pronoun;
this.updatePlayer("pronoun", pronoun, true);
},
toggleStatus() { toggleStatus() {
if (this.grimoire.isPublic) { if (this.grimoire.isPublic) {
if (!this.player.isDead) { if (!this.player.isDead) {