X-Git-Url: https://git.auder.net/assets/config.php?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=1ea862fbe05264fd7de870a3c18984ea41c44d94;hb=63ca2b89cfe577efd168c6b2e26750cb01b66d64;hp=1e7a83bbde1cf9adca2644ad1ab4b62525b01f49;hpb=13aa5a44fe3da4eac5ab04f0120ccbd5927f91c1;p=vchess.git
diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue
index 1e7a83bb..1ea862fb 100644
--- a/client/src/components/BaseGame.vue
+++ b/client/src/components/BaseGame.vue
@@ -1,52 +1,52 @@
-.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 }}
- Board(:vr="vr" :last-move="lastMove" :analyze="analyze" :user-color="mycolor"
- :orientation="orientation" :vname="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"] }}
- button Import game
- //MoveList(v-if="showMoves"
- :moves="moves" :cursor="cursor" @goto-move="gotoMove")
+div#baseGame(tabindex=-1 @click="() => focusBg()" @keydown="handleKeys")
+ 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 }}
+ .row
+ #boardContainer.col-sm-12.col-md-9
+ Board(:vr="vr" :last-move="lastMove" :analyze="game.mode=='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") >>
+ #pgnDiv
+ a#download(href="#")
+ button(@click="download") {{ st.tr["Download PGN"] }}
+ button(v-if="game.mode!='analyze'" @click="analyzePosition")
+ | {{ st.tr["Analyze"] }}
+ .col-sm-12.col-md-3
+ MoveList(v-if="showMoves" :score="game.score" :message="game.scoreMsg"
+ :moves="moves" :cursor="cursor" @goto-move="gotoMove")
+
+