X-Git-Url: https://git.auder.net/pieces/Checkered/cb.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=c3387e82b6b545b91be9a0dd8746ac1abbb13fc2;hb=73f8753ff5abf6c5819684920565e655b6858175;hp=470488f66288a7e136293b0a483091480bb15835;hpb=7e355d68b5962aad106e28a9d669a47f3cbec43a;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index 470488f6..c3387e82 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,113 +1,270 @@
-div
+div#baseGame
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 }}
- .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")
+ h3.section {{ endgameMessage }}
+ #gameContainer
+ #boardContainer
+ Board(
+ ref="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"
+ @click-square="clickSquare"
+ )
+ #turnIndicator(v-if="showTurn") {{ turn }}
+ #controls.button-group
+ button(@click="gotoBegin()")
+ img.inline(src="/images/icons/fast-forward_rev.svg")
+ button(@click="undo()")
+ img.inline(src="/images/icons/play_rev.svg")
+ button(v-if="canFlip" @click="flip()")
+ img.inline(src="/images/icons/flip.svg")
+ button(
+ @click="runAutoplay()"
+ :class="{'in-autoplay': autoplay}"
+ )
+ img.inline(src="/images/icons/autoplay.svg")
+ button(@click="play()")
+ img.inline(src="/images/icons/play.svg")
+ button(@click="gotoEnd()")
+ img.inline(src="/images/icons/fast-forward.svg")
+ #movesList
+ MoveList(
+ :show="showMoves"
+ :canAnalyze="canAnalyze"
+ :canDownload="allowDownloadPGN"
+ :score="game.score"
+ :message="game.scoreMsg"
+ :firstNum="firstMoveNumber"
+ :moves="moves"
+ :cursor="cursor"
+ @download="download"
+ @showrules="showRules"
+ @analyze="analyzePosition"
+ @goto-move="gotoMove"
+ @reset-arrows="resetArrows"
+ )
+ .clearer
+
+