X-Git-Url: https://git.auder.net/pieces/Checkered/cn.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=ccf9d73447f4146f4b948299e7ad8b940be24f92;hb=d6289b54e43a80375ec91ef74730ebfbe180afa7;hp=e04f5082e08e98f56ecf9bc98e8ae362a3d273af;hpb=430a203855578f9bbf4c851165c6066a741ff1f8;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index e04f5082..ccf9d734 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,94 +1,178 @@
-div#baseGame(tabindex=-1 @click="() => focusBg()" @keydown="handleKeys")
+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 }}
- .row
- #boardContainer.col-sm-12.col-md-9
- Board(:vr="vr" :last-move="lastMove" :analyze="analyze"
- :user-color="game.mycolor" :orientation="orientation"
- :vname="game.vname" @play-move="play")
- #controls
- button(@click="gotoBegin") <<
- button(@click="() => undo()") <
- button(@click="flip") ⇅
- button(@click="() => play()") >
- button(@click="gotoEnd") >>
- #fenDiv(v-if="showFen && !!vr")
- p(@click="gotoFenContent") {{ vr.getFen() }}
- #pgnDiv
- a#download(href="#")
- button(@click="download") {{ st.tr["Download PGN"] }}
- .col-sm-12.col-md-3
- MoveList(v-if="showMoves" :score="game.score" :message="game.scoreMsg"
- :moves="moves" :cursor="cursor" @goto-move="gotoMove")
+ h3.section {{ endgameMessage }}
+ #gameContainer
+ #boardContainer
+ Board(
+ ref="board"
+ :vr="vr"
+ :last-move="lastMove"
+ :analyze="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")
+ p(v-show="showFen") {{ (!!vr ? vr.getFen() : "") }}
+ #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="toggleAnalyze"
+ @goto-move="gotoMove"
+ @reset-arrows="resetArrows"
+ )
+ .clearer
-