X-Git-Url: https://git.auder.net/doc/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=5c55656314b3aac849f0e196fe6277c3c05e42d0;hb=1c9826a545b4336ede227c132d7ccfdba70c4ec0;hp=27821c3af07a847114a89d192c862ca2f94bce3d;hpb=cf94b843f223b34fd2f3680112a183f6d5cd409c;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index 27821c3a..5c556563 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,32 +1,64 @@
-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 }}
+ 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")
+ 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"
+ )
+ #turnIndicator(v-if="showTurn") {{ 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.mode!='analyze'" @click="analyzePosition")
- | {{ st.tr["Analyze"] }}
+ 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="play()")
+ img.inline(src="/images/icons/play.svg")
+ button(@click="gotoEnd()")
+ img.inline(src="/images/icons/fast-forward.svg")
+ #belowControls
+ #downloadDiv(v-if="allowDownloadPGN")
+ a#download(href="#")
+ button(@click="download()") {{ st.tr["Download"] }} PGN
+ button(
+ v-if="canAnalyze"
+ @click="analyzePosition()"
+ )
+ | {{ st.tr["Analyse"] }}
+ // NOTE: variants pages already have a "Rules" link on top
+ 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")
- // TODO: clearer required ?!
- .clearer
+ MoveList(
+ :show="showMoves"
+ :score="game.score"
+ :message="game.scoreMsg"
+ :firstNum="firstMoveNumber"
+ :moves="moves"
+ :cursor="cursor"
+ @goto-move="gotoMove"
+ )
+ .clearer
-