X-Git-Url: https://git.auder.net/variants/Checkered/style.css?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=a1af478f7740ab1cf1791c867f3a9872791e33e6;hb=0e912cb2584b4c18c0b3a8dec32b86fc8780bc66;hp=dd8c5c86fee436bc02a4cbb25b3d84089382bc41;hpb=0e16cb26f6380f57f1079ece9bdb654243073bde;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index dd8c5c86..a1af478f 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,119 +1,178 @@
-div#baseGame(tabindex=-1 @click="() => focusBg()"
- @keydown="handleKeys" @wheel="handleScroll")
+div#baseGame
input#modalEog.modal(type="checkbox")
- div(role="dialog" data-checkbox="modalEog" 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 }}
+ h3.section {{ endgameMessage }}
#gameContainer
#boardContainer
- Board(:vr="vr" :last-move="lastMove" :analyze="game.mode=='analyze'"
- :user-color="game.mycolor" :orientation="orientation"
- :vname="game.vname" @play-move="play")
- #turnIndicator(v-if="game.vname=='Dark' && game.mode!='analyze'")
- | {{ 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.vname!='Dark' && game.mode!='analyze'"
- @click="analyzePosition")
- | {{ st.tr["Analyze"] }}
- button(@click="showRules") {{ st.tr["Rules"] }}
+ 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#fenAnalyze(v-show="showFen") {{ (!!vr ? vr.getFen() : "") }}
#movesList
- MoveList(v-if="showMoves" :score="game.score" :message="game.scoreMsg"
- :firstNum="firstMoveNumber" :moves="moves" :cursor="cursor"
- @goto-move="gotoMove")
+ 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