X-Git-Url: https://git.auder.net/pieces/Checkered/cp.svg?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=0741d31753f8df5c66cd067b91c5ba09516413c1;hb=e5c1d0fb0ed18632e9172c932d6e5c2c8c5742b8;hp=2751b56b84de5d2d2c5837ad0d8f40caadeee9d2;hpb=b7cbbda10f16c2419f9a4d49e219fcface5e5658;p=vchess.git
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index 2751b56b..0741d317 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1,16 +1,67 @@
-.row
- .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- BaseGame(:game="game" :vr="vr" ref="basegame"
- @newmove="processMove" @gameover="gameOver")
- div Names: {{ game.players[0].name }} - {{ game.players[1].name }}
- div(v-if="game.score=='*'") Time: {{ virtualClocks[0] }} - {{ virtualClocks[1] }}
- .button-group(v-if="game.mode!='analyze' && game.score=='*'")
- button(@click="offerDraw") Draw
- button(@click="abortGame") Abort
- button(@click="resign") Resign
- textarea(v-if="game.score=='*'" v-model="corrMsg")
- Chat(:players="game.players")
+main
+ input#modalChat.modal(
+ type="checkbox"
+ @click="resetChatColor()"
+ )
+ div#chatWrap(
+ role="dialog"
+ data-checkbox="modalChat"
+ )
+ #chat.card
+ label.modal-close(for="modalChat")
+ #participants
+ span {{ Object.keys(people).length + " " + st.tr["participant(s):"] }}
+ span(
+ v-for="p in Object.values(people)"
+ v-if="p.name"
+ )
+ | {{ p.name }}
+ span.anonymous(v-if="Object.values(people).some(p => !p.name && p.id === 0)")
+ | + @nonymous
+ Chat(
+ :players="game.players"
+ :pastChats="game.chats"
+ :newChat="newChat"
+ @mychat="processChat"
+ @chatcleared="clearChat"
+ )
+ .row
+ #aboveBoard.col-sm-12.col-md-9.col-md-offset-3.col-lg-10.col-lg-offset-2
+ span.variant-cadence {{ game.cadence }}
+ span.variant-name {{ game.vname }}
+ button#chatBtn(onClick="window.doClick('modalChat')") Chat
+ #actions(v-if="game.score=='*'")
+ button(
+ @click="clickDraw()"
+ :class="{['draw-' + drawOffer]: true}"
+ )
+ | {{ st.tr["Draw"] }}
+ button(
+ v-if="!!game.mycolor"
+ @click="abortGame()"
+ )
+ | {{ st.tr["Abort"] }}
+ button(
+ v-if="!!game.mycolor"
+ @click="resign()"
+ )
+ | {{ st.tr["Resign"] }}
+ #playersInfo
+ p
+ span.name(:class="{connected: isConnected(0)}")
+ | {{ game.players[0].name || "@nonymous" }}
+ span.time(v-if="game.score=='*'") {{ virtualClocks[0] }}
+ span.split-names -
+ span.name(:class="{connected: isConnected(1)}")
+ | {{ game.players[1].name || "@nonymous" }}
+ span.time(v-if="game.score=='*'") {{ virtualClocks[1] }}
+ BaseGame(
+ ref="basegame"
+ :game="game"
+ @newmove="processMove"
+ @gameover="gameOver"
+ )
-