X-Git-Url: https://git.auder.net/images/pieces/Cwda/bd.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=433a8ac63da158a1b3947a813f56ae4cbab780b4;hb=29bc61bed4a31df9353640a60a386f7f1ae0643b;hp=a2d78a069d959660b3284be5d1c8aa559172366d;hpb=7aa548e72ba8a4af4e2c7f63e7723ad10d2cd3a4;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index a2d78a06..433a8ac6 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,29 +1,80 @@
-div
+div#baseGame(
+ tabindex=-1
+ @click="focusBg()"
+ @keydown="handleKeys($event)"
+ @wheel="handleScroll($event)"
+)
input#modalEog.modal(type="checkbox")
- div(role="dialog" 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 }}
- .row
- .col-sm-12.col-md-9.col-lg-8
- Board(:vr="vr" :last-move="lastMove" :analyze="analyze"
- :user-color="game.mycolor" :orientation="orientation"
- :vname="game.vname" @play-move="play")
- .button-group
- button(@click="() => play()") Play
- button(@click="() => undo()") Undo
- button(@click="flip") Flip
- button(@click="gotoBegin") GotoBegin
- button(@click="gotoEnd") GotoEnd
- #fenDiv(v-if="showFen && !!vr")
- p {{ vr.getFen() }}
- #pgnDiv
- a#download(href="#")
- button(@click="download") {{ st.tr["Download PGN"] }}
- .col-sm-12.col-md-3.col-lg-4
- MoveList(v-if="showMoves"
- :moves="moves" :cursor="cursor" @goto-move="gotoMove")
+ 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="analyze"
+ :user-color="game.mycolor"
+ :orientation="orientation"
+ :vname="game.vname"
+ :incheck="incheck"
+ @play-move="play"
+ )
+ #turnIndicator(v-if="game.vname=='Dark' && game.score=='*'")
+ | {{ st.tr[vr.turn + " to move"] }}
+ #controls
+ button(@click="gotoBegin()") <<
+ button(@click="undo()") <
+ button(@click="flip()") ⇅
+ button(@click="play()") >
+ button(@click="gotoEnd()") >>
+ #belowControls
+ #downloadDiv(v-if="game.vname!='Dark' || game.score!='*'")
+ a#download(href="#")
+ button(@click="download()") {{ st.tr["Download"] }} PGN
+ button(onClick="window.doClick('modalAdjust')") ⤢
+ button(
+ v-if="game.vname!='Dark' && game.mode!='analyze'"
+ @click="analyzePosition()"
+ )
+ | {{ st.tr["Analyse"] }}
+ // NOTE: rather ugly hack to avoid showing twice "rules" link...
+ 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"
+ )
+ .clearer
+
+