X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=523e0ef6d89061efd5734bfca1a72b8f46572746;hb=ea7adb58856831def06a2c076153b0b34d904e37;hp=470488f66288a7e136293b0a483091480bb15835;hpb=7e355d68b5962aad106e28a9d669a47f3cbec43a;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index 470488f6..523e0ef6 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,28 +1,47 @@
-div
+div#baseGame(tabindex=-1 @click="() => focusBg()"
+ @keydown="handleKeys" @wheel="handleScroll")
input#modalEog.modal(type="checkbox")
- div(role="dialog" aria-labelledby="eogMessage")
+ div#eogDiv(role="dialog" data-checkbox="modalEog" aria-labelledby="eogMessage")
.card.smallpad.small-modal.text-center
label.modal-close(for="modalEog")
h3#eogMessage.section {{ endgameMessage }}
- .float70 //TODO: use mini-css predefined styles
- 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"] }}
- .float30 //TODO: should be optional (adjust widths dynamically)
- MoveList(v-if="showMoves"
- :moves="moves" :cursor="cursor" @goto-move="gotoMove")
+ input#modalAdjust.modal(type="checkbox")
+ div#adjuster(role="dialog" data-checkbox="modalAdjust" aria-labelledby="labelAdjust")
+ .card.smallpad.small-modal.text-center
+ label.modal-close(for="modalAdjust")
+ label#labelAdjust(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=='*'")
+ | {{ turn }}
+ #controls
+ button(@click="gotoBegin") <<
+ button(@click="() => undo()") <
+ button(@click="flip") ⇅
+ button(@click="() => play()") >
+ button(@click="gotoEnd") >>
+ #pgnDiv
+ #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["Analyze"] }}
+ // 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
+
+