div
input#modalNewgame.modal(type="checkbox")
div(role="dialog" aria-labelledby="titleFenedit")
.card.smallpad
label#closeNewgame.modal-close(for="modalNewgame")
fieldset
label(for="selectVariant") {{ st.tr["Variant"] }}
select#selectVariant(v-model="newgameInfo.vid")
option(v-for="v in st.variants" :value="v.id") {{ v.name }}
fieldset
label(for="selectNbPlayers") {{ st.tr["Number of players"] }}
select#selectNbPlayers(v-model="newgameInfo.nbPlayers")
option(v-show="possibleNbplayers(2)" value="2") 2
option(v-show="possibleNbplayers(3)" value="3") 3
option(v-show="possibleNbplayers(4)" value="4") 4
fieldset
label(for="timeControl") Time control (in days)
#timeControl
input(type="number" v-model="newgameInfo.mainTime"
placeholder="Main time")
input(type="number" v-model="newgameInfo.increment"
placeholder="Increment")
fieldset
label(for="selectPlayers") {{ st.tr["Play with?"] }}
#selectPlayers
input(type="text" v-model="newgameInfo.players[0].name")
input(v-show="newgameInfo.nbPlayers>=3" type="text"
v-model="newgameInfo.players[1].name")
input(v-show="newgameInfo.nbPlayers==4" type="text"
v-model="newgameInfo.players[2].name")
fieldset
label(for="inputFen")
| {{ st.tr["FEN (ignored if players fields are blank)"] }}
input#inputFen(type="text" v-model="newgameInfo.fen")
button(@click="newGame") Launch game
p TODO: cadence, adversaire (pre-filled if click on name)
p cadence 2m+12s ou 7d+1d (m,s ou d,d) --> main, increment
p Note: leave FEN blank for random; FEN only for targeted challenge
div
ChallengeList(:challenges="challenges" @click-challenge="clickChallenge")
div(style="border:1px solid black")
h3 Online players
div(v-for="p in players" @click="challenge(p)") {{ p.name }}
button(onClick="doClick('modalNewgame')") New game
div
.button-group
button(@click="gdisplay='live'") Live games
button(@click="gdisplay='corr'") Correspondance games
GameList(v-show="gdisplay=='live'" :games="liveGames"
@show-game="showGame")
GameList(v-show="gdisplay=='corr'" :games="corrGames"
@show-game="showGame")