X-Git-Url: https://git.auder.net/game/%22%20%20%20data.gameInfo.gameId%20%20%20%22?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=f5eb9a67c889162837f4dd98ebe0d4c60e8d0242;hb=2f258c37c19c5be20ec68695ddfaec2c21f7f0ae;hp=1ea862fbe05264fd7de870a3c18984ea41c44d94;hpb=63ca2b89cfe577efd168c6b2e26750cb01b66d64;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index 1ea862fb..f5eb9a67 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,29 +1,47 @@
-div#baseGame(tabindex=-1 @click="() => focusBg()" @keydown="handleKeys")
+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
- #boardContainer.col-sm-12.col-md-9
- Board(:vr="vr" :last-move="lastMove" :analyze="game.mode=='analyze'"
+ 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" @play-move="play")
+ :vname="game.vname" :incheck="incheck" @play-move="play")
+ #turnIndicator(v-if="game.vname=='Dark' && game.score=='*'")
+ | {{ 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"] }}
- .col-sm-12.col-md-3
+ 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="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"
- :moves="moves" :cursor="cursor" @goto-move="gotoMove")
+ :firstNum="firstMoveNumber" :moves="moves" :cursor="cursor"
+ @goto-move="gotoMove")
+ .clearer
-