mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
add players by comma separated list
This commit is contained in:
parent
18746ab642
commit
e37234f315
2 changed files with 23 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
|||
# Release Notes
|
||||
|
||||
### Version 2.15.3
|
||||
- add Add Player by comma separated list
|
||||
|
||||
### Version 2.15.3
|
||||
- add Huntsman/Damsel, Noble, Al-Hadikhia to list of available characters
|
||||
|
||||
|
|
|
@ -118,9 +118,7 @@
|
|||
<li class="headline" v-if="session.sessionId">
|
||||
{{ session.isSpectator ? "Playing" : "Hosting" }}
|
||||
</li>
|
||||
<li class="headline" v-else>
|
||||
Live Session
|
||||
</li>
|
||||
<li class="headline" v-else>Live Session</li>
|
||||
<template v-if="!session.sessionId">
|
||||
<li @click="hostSession">Host (Storyteller)<em>[H]</em></li>
|
||||
<li @click="joinSession">Join (Player)<em>[J]</em></li>
|
||||
|
@ -155,6 +153,9 @@
|
|||
<!-- Users -->
|
||||
<li class="headline">Players</li>
|
||||
<li @click="addPlayer" v-if="players.length < 20">Add<em>[A]</em></li>
|
||||
<li @click="addPlayerList" v-if="players.length < 20">
|
||||
Add (List)<em>[A]</em>
|
||||
</li>
|
||||
<li @click="randomizeSeatings" v-if="players.length > 2">
|
||||
Randomize
|
||||
<em><font-awesome-icon icon="dice"/></em>
|
||||
|
@ -318,6 +319,22 @@ export default {
|
|||
this.$store.commit("players/add", name);
|
||||
}
|
||||
},
|
||||
addPlayerList() {
|
||||
if (this.session.isSpectator) return;
|
||||
if (confirm("This will clear all players. Are you sure you want to remove all players?")) {
|
||||
// abort vote if in progress
|
||||
if (this.session.nomination) {
|
||||
this.$store.commit("session/nomination");
|
||||
}
|
||||
this.$store.commit("players/clear");
|
||||
const names = prompt("Player names (separated by commas)");
|
||||
if (names) {
|
||||
names.split(',').map(name => {
|
||||
this.$store.commit("players/add", name);
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
randomizeSeatings() {
|
||||
if (this.session.isSpectator) return;
|
||||
if (confirm("Are you sure you want to randomize seatings?")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue