X-Git-Url: https://git.auder.net/doc/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=3573643d22a694219dfb8d6f6b875017679419cd;hb=71ef1664983cd58db3c3bbfdf6cb7c362474e9a5;hp=2bf1fbdb3b9bbd0d3389c6d54b2a3756b3b50e3d;hpb=dcd68c4108412f45b8ce119ae80ce8f6e296800b;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index 2bf1fbdb..3573643d 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,33 +1,81 @@
-div#baseGame(tabindex=-1 @click="() => focusBg()"
- @keydown="handleKeys" @wheel="handleScroll")
+div#baseGame(
+ tabindex=-1
+ @click="focusBg()"
+ @keydown="handleKeys($event)"
+ @wheel="handleScroll($event)"
+)
input#modalEog.modal(type="checkbox")
- div(role="dialog" data-checkbox="modalEog" aria-labelledby="eogMessage")
- .card.smallpad.small-modal.text-center
+ div#eogDiv(
+ role="dialog"
+ data-checkbox="modalEog"
+ )
+ .card.text-center
label.modal-close(for="modalEog")
- h3#eogMessage.section {{ endgameMessage }}
+ h3.section {{ endgameMessage }}
+ input#modalAdjust.modal(type="checkbox")
+ div#adjuster(
+ role="dialog"
+ data-checkbox="modalAdjust"
+ )
+ .card.text-center
+ label.modal-close(for="modalAdjust")
+ label(for="boardSize") {{ st.tr["Board size"] }}
+ input#boardSize.slider(
+ type="range"
+ min="0"
+ max="100"
+ value="50"
+ @input="adjustBoard()"
+ )
#gameContainer
#boardContainer
- Board(:vr="vr" :last-move="lastMove" :analyze="game.mode=='analyze'"
- :user-color="game.mycolor" :orientation="orientation"
- :vname="game.vname" @play-move="play")
+ Board(
+ :vr="vr"
+ :last-move="lastMove"
+ :analyze="game.mode=='analyze'"
+ :score="game.score"
+ :user-color="game.mycolor"
+ :orientation="orientation"
+ :vname="game.vname"
+ :incheck="incheck"
+ @play-move="play"
+ )
+ #turnIndicator(v-if="showTurn") {{ turn }}
#controls
- button(@click="gotoBegin") <<
- button(@click="() => undo()") <
- button(@click="flip") ⇅
- button(@click="() => play()") >
- button(@click="gotoEnd") >>
- #pgnDiv
- a#download(href="#")
- button(@click="download") {{ st.tr["Download PGN"] }}
- button(v-if="game.mode!='analyze'" @click="analyzePosition")
- | {{ st.tr["Analyze"] }}
+ button(@click="gotoBegin()") <<
+ button(@click="undo()") <
+ button(v-if="canFlip" @click="flip()") ⇅
+ button(@click="play()") >
+ button(@click="gotoEnd()") >>
+ #belowControls
+ #downloadDiv(v-if="allowDownloadPGN")
+ a#download(href="#")
+ button(@click="download()") {{ st.tr["Download"] }} PGN
+ button(onClick="window.doClick('modalAdjust')") ⤢
+ button(
+ v-if="canAnalyze"
+ @click="analyzePosition()"
+ )
+ | {{ st.tr["Analyse"] }}
+ // NOTE: variants pages already have a "Rules" link on top
+ button(
+ v-if="!$route.path.match('/variants/')"
+ @click="showRules()"
+ )
+ | {{ st.tr["Rules"] }}
#movesList
- MoveList(v-if="showMoves" :score="game.score" :message="game.scoreMsg"
- :firstNum="firstMoveNumber" :moves="moves" :cursor="cursor"
- @goto-move="gotoMove")
- // TODO: clearer required ?!
- .clearer
+ MoveList(
+ v-if="showMoves != 'none'"
+ :show="showMoves"
+ :score="game.score"
+ :message="game.scoreMsg"
+ :firstNum="firstMoveNumber"
+ :moves="moves"
+ :cursor="cursor"
+ @goto-move="gotoMove"
+ )
+ .clearer
-