X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=b9262d12b339246ce91688e0781164e6ed1d0e11;hp=92030e74089650d9c1b697f40e38cdd6d1a40d4a;hb=0234201fb338fc239d6f613c677fa932c7c3697c;hpb=e727fe31742dfb3e40eb222c94f4199e2be98453 diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 92030e74..b9262d12 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -34,7 +34,7 @@ main ) .card label#closeNewgame.modal-close(for="modalNewgame") - div(@keyup.enter="newChallenge()") + div(@keyup.enter="issueNewChallenge()") fieldset label(for="selectVariant") {{ st.tr["Variant"] }} * select#selectVariant( @@ -65,8 +65,21 @@ main option(value="0") {{ st.tr["Deterministic"] }} option(value="1") {{ st.tr["Symmetric random"] }} option(value="2") {{ st.tr["Asymmetric random"] }} + fieldset + label(for="memorizeChall") {{ st.tr["Memorize"] }} + input#memorizeChall( + type="checkbox" + v-model="newchallenge.memorize" + ) fieldset(v-if="st.user.id > 0") - label(for="selectPlayers") {{ st.tr["Play with?"] }} + label(for="selectPlayers") {{ st.tr["Play with"] }} + select#selectPlayersInList(v-model="newchallenge.to") + option(value="") + option( + v-for="p in Object.values(people)" + :value="p.name" + ) + | {{ p.name }} input#selectPlayers( type="text" v-model="newchallenge.to" @@ -79,7 +92,7 @@ main v-model="newchallenge.fen" ) .diagram(v-html="newchallenge.diag") - button(@click="newChallenge()") {{ st.tr["Send challenge"] }} + button(@click="issueNewChallenge()") {{ st.tr["Send challenge"] }} input#modalPeople.modal( type="checkbox" @click="resetSocialColor()" @@ -122,6 +135,26 @@ main | {{ st.tr["Who's there?"] }} button(@click="showNewchallengeForm()") | {{ st.tr["New game"] }} + .row(v-if="presetChalls.length > 0") + .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 + h4.text-center {{ st.tr["Preset challenges"] }} + table + thead + tr + th {{ st.tr["Variant"] }} + th {{ st.tr["Cadence"] }} + th {{ st.tr["Random?"] }} + th + tbody + tr( + v-for="pc in presetChalls" + @click="newChallFromPreset(pc)" + ) + td {{ pc.vname }} + td {{ pc.cadence }} + td(:class="getRandomnessClass(pc)") + td.remove-preset(@click="removePresetChall($event, pc)") + img(src="/images/icons/delete.svg") .row .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 div#div2 @@ -152,12 +185,17 @@ main :showBoth="true" @show-game="showGame" ) - GameList( - v-show="gdisplay=='corr'" - :games="filterGames('corr')" - :showBoth="true" - @show-game="showGame" - ) + div(v-show="gdisplay=='corr'") + GameList( + :games="filterGames('corr')" + :showBoth="true" + @show-game="showGame" + ) + button#loadMoreBtn( + v-if="hasMore" + @click="loadMore()" + ) + | {{ st.tr["Load more"] }}