- fieldset
- label(for="selectVariant") {{ st.tr["Variant"] }} *
- select#selectVariant(v-model="newchallenge.vid")
- option(v-for="v in st.variants" :value="v.id"
- :selected="newchallenge.vid==v.id")
- | {{ v.name }}
- fieldset
- label(for="cadence") {{ st.tr["Cadence"] }} *
- div#predefinedCadences
- button 3+2
- button 5+3
- button 15+5
- input#cadence(type="text" v-model="newchallenge.cadence"
- placeholder="5+0, 1h+30s, 7d+1d ...")
- fieldset(v-if="st.user.id > 0")
- label(for="selectPlayers") {{ st.tr["Play with?"] }}
- input#selectPlayers(type="text" v-model="newchallenge.to")
- fieldset(v-if="st.user.id > 0 && newchallenge.to.length > 0")
- label(for="inputFen") FEN
- input#inputFen(type="text" v-model="newchallenge.fen")
+ div(@keyup.enter="newChallenge()")
+ fieldset
+ label(for="selectVariant") {{ st.tr["Variant"] }} *
+ select#selectVariant(
+ @change="loadNewchallVariant(trySetNewchallDiag)"
+ v-model="newchallenge.vid"
+ )
+ option(
+ v-for="v in st.variants"
+ :value="v.id"
+ :selected="newchallenge.vid==v.id"
+ )
+ | {{ v.name }}
+ fieldset
+ label(for="cadence") {{ st.tr["Cadence"] }} *
+ div#predefinedCadences
+ button(type="button") 15+5
+ button(type="button") 45+30
+ button(type="button") 3d
+ button(type="button") 7d
+ input#cadence(
+ type="text"
+ v-model="newchallenge.cadence"
+ placeholder="5+0, 1h+30s, 5d ..."
+ )
+ fieldset
+ label(for="selectRandomLevel") {{ st.tr["Randomness"] }} *
+ select#selectRandomLevel(v-model="newchallenge.randomness")
+ option(value="0") {{ st.tr["Deterministic"] }}
+ option(value="1") {{ st.tr["Symmetric random"] }}
+ option(value="2") {{ st.tr["Asymmetric random"] }}
+ fieldset(v-if="st.user.id > 0")
+ label(for="selectPlayers") {{ st.tr["Play with?"] }}
+ input#selectPlayers(
+ type="text"
+ v-model="newchallenge.to"
+ )
+ fieldset(v-if="st.user.id > 0 && newchallenge.to.length > 0")
+ input#inputFen(
+ placeholder="FEN"
+ @input="trySetNewchallDiag()"
+ type="text"
+ v-model="newchallenge.fen"
+ )
+ .diagram(v-html="newchallenge.diag")