mirror of https://github.com/bra1n/townsquare.git
adding method and dialog to player vue to update player pronoun in state.
This commit is contained in:
parent
cb45da4de4
commit
ccd40ccc99
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue