mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
updated clear player list prompt
This commit is contained in:
parent
e37234f315
commit
06817acd6c
1 changed files with 8 additions and 4 deletions
|
@ -321,7 +321,11 @@ export default {
|
||||||
},
|
},
|
||||||
addPlayerList() {
|
addPlayerList() {
|
||||||
if (this.session.isSpectator) return;
|
if (this.session.isSpectator) return;
|
||||||
if (confirm("This will clear all players. Are you sure you want to remove all players?")) {
|
if (
|
||||||
|
confirm(
|
||||||
|
"This will clear all players. Are you sure you want to do this?"
|
||||||
|
)
|
||||||
|
) {
|
||||||
// abort vote if in progress
|
// abort vote if in progress
|
||||||
if (this.session.nomination) {
|
if (this.session.nomination) {
|
||||||
this.$store.commit("session/nomination");
|
this.$store.commit("session/nomination");
|
||||||
|
@ -329,9 +333,9 @@ export default {
|
||||||
this.$store.commit("players/clear");
|
this.$store.commit("players/clear");
|
||||||
const names = prompt("Player names (separated by commas)");
|
const names = prompt("Player names (separated by commas)");
|
||||||
if (names) {
|
if (names) {
|
||||||
names.split(',').map(name => {
|
names.split(",").map(name => {
|
||||||
this.$store.commit("players/add", name);
|
this.$store.commit("players/add", name);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue