X-Git-Url: https://git.auder.net/images/diag_mark.svg?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=8f9b946ad2a1aebc1a10f577df2a6e33dffad239;hb=0e16cb26f6380f57f1079ece9bdb654243073bde;hp=c60b17c741b744d0099a6402391292943435028b;hpb=4fe5664d48e37cf7e0de7562e8e76e8698b0ea74;p=vchess.git
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index c60b17c7..8f9b946a 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1,265 +1,631 @@
-
-.row
- .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- BaseGame(:vname="vname" :game-info="gameInfo" :analyze="analyze" :vr="vr"
- ref="basegame" @newmove="processMove")
- .button-group(v-if="mode!='analyze'")
- button(@click="offerDraw") Draw
- button(@click="abortGame") Abort
- button(@click="resign") Resign
- div(v-if="mode=='corr'")
- textarea(v-show="score=='*' && vr.turn==mycolor" v-model="corrMsg")
- div(v-show="cursor>=0") {{ moves[cursor].message }}
+main
+ input#modalChat.modal(type="checkbox" @change="toggleChat")
+ div#chatWrap(role="dialog" data-checkbox="modalChat"
+ aria-labelledby="inputChat")
+ #chat.card
+ label.modal-close(for="modalChat")
+ Chat(:players="game.players" :pastChats="game.chats"
+ @newchat-sent="finishSendChat" @newchat-received="processChat")
+ .row
+ #aboveBoard.col-sm-12.col-md-9.col-md-offset-3.col-lg-10.col-lg-offset-2
+ button#chatBtn(onClick="doClick('modalChat')") Chat
+ #actions(v-if="game.mode!='analyze' && game.score=='*'")
+ button(@click="clickDraw" :class="{['draw-' + drawOffer]: true}") Draw
+ button(@click="abortGame") Abort
+ button(@click="resign") Resign
+ #playersInfo
+ p
+ span.name(:class="{connected: isConnected(0)}") {{ game.players[0].name }}
+ span.time(v-if="game.score=='*'") {{ virtualClocks[0] }}
+ span.split-names -
+ span.name(:class="{connected: isConnected(1)}") {{ game.players[1].name }}
+ span.time(v-if="game.score=='*'") {{ virtualClocks[1] }}
+ BaseGame(:game="game" :vr="vr" ref="basegame"
+ @newmove="processMove" @gameover="gameOver")
+
+