X-Git-Url: https://git.auder.net/assets/%7B%7B%20path%28%27mixstore_store_usecase_delete%27%2C%20%7B%20id:%20ucs.id%20%7D%29%20%7D%7D?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=fd26d87204f5c0b9e48743c121c0e36bb792183b;hb=1ef65040168ab7d55ce921abc9d63644a937d689;hp=c52f94c8a1193c70c494f3cf1e19f520657165db;hpb=8477e53d8e78606e4c4e4bf91c77b1011aab583c;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index c52f94c8..fd26d872 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,10 +1,5 @@
-div#baseGame(
- tabindex=-1
- @click="focusBg()"
- @keydown="handleKeys($event)"
- @wheel="handleScroll($event)"
-)
+div#baseGame
input#modalEog.modal(type="checkbox")
div#eogDiv(
role="dialog"
@@ -13,24 +8,10 @@ div#baseGame(
.card.text-center
label.modal-close(for="modalEog")
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(
+ ref="board"
:vr="vr"
:last-move="lastMove"
:analyze="game.mode=='analyze'"
@@ -40,39 +21,40 @@ div#baseGame(
:vname="game.vname"
:incheck="incheck"
@play-move="play"
+ @click-square="clickSquare"
)
#turnIndicator(v-if="showTurn") {{ turn }}
- #controls
- button(@click="gotoBegin()") <<
- button(@click="undo()") <
- button(@click="flip()") ⇅
- button(@click="play()") >
- button(@click="gotoEnd()") >>
- #belowControls
- #downloadDiv(v-if="allowDownloadPGN")
- a#download(href="#")
- button(@click="download()") {{ st.tr["Download"] }} PGN
- button(onClick="window.doClick('modalAdjust')") ⤢
- button(
- v-if="canAnalyze"
- @click="analyzePosition()"
- )
- | {{ st.tr["Analyse"] }}
- // NOTE: variants pages already have a "Rules" link on top
+ #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(
- v-if="!$route.path.match('/variants/')"
- @click="showRules()"
+ @click="runAutoplay()"
+ :class="{'in-autoplay': autoplay}"
)
- | {{ st.tr["Rules"] }}
+ 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(
- v-if="showMoves"
+ :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
@@ -80,23 +62,26 @@ div#baseGame(