X-Git-Url: https://git.auder.net/variants/Checkered/style.css?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=dd8c5c86fee436bc02a4cbb25b3d84089382bc41;hb=0e16cb26f6380f57f1079ece9bdb654243073bde;hp=b5a82dfbfda16cbcc9fb462f560fb233ce6807ea;hpb=21baf44462799a80c4b1cd772de8c3c4fa0b3d37;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index b5a82dfb..dd8c5c86 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,36 +1,41 @@
-.row
- .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- input#modalEog.modal(type="checkbox")
- div(role="dialog" aria-labelledby="eogMessage")
- .card.smallpad.small-modal.text-center
- label.modal-close(for="modalEog")
- h3#eogMessage.section {{ endgameMessage }}
- // TODO: or "BoardHex" if this.game.vname in "Hexagonal..."
- 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.section-content(v-if="showFen && !!vr")
- p#fenString.text-center {{ vr.getFen() }}
- #pgnDiv.section-content
- a#download(href="#")
- .button-group
- button#downloadBtn(@click="download") {{ st.tr["Download PGN"] }}
- // TODO: Import game button copy game locally in IndexedDB
- //button Import game
- //MoveList(v-if="showMoves"
- :moves="moves" :cursor="cursor" @goto-move="gotoMove")
+div#baseGame(tabindex=-1 @click="() => focusBg()"
+ @keydown="handleKeys" @wheel="handleScroll")
+ input#modalEog.modal(type="checkbox")
+ div(role="dialog" data-checkbox="modalEog" aria-labelledby="eogMessage")
+ .card.smallpad.small-modal.text-center
+ label.modal-close(for="modalEog")
+ h3#eogMessage.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"] }}
+ #movesList
+ MoveList(v-if="showMoves" :score="game.score" :message="game.scoreMsg"
+ :firstNum="firstMoveNumber" :moves="moves" :cursor="cursor"
+ @goto-move="gotoMove")
+ .clearer
+
+