X-Git-Url: https://git.auder.net/parser.js?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=9a9710063932256181df338851688c41ba85d53b;hb=910d631b73cad5ffef1b4461157b704e7e7057d8;hp=0c3de58f9150a4061f6f4ce68e30dcc6bc3b6b6b;hpb=cf94b843f223b34fd2f3680112a183f6d5cd409c;p=vchess.git
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index 0c3de58f..9a971006 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1,22 +1,66 @@
main
- input#modalChat.modal(type="checkbox" @change="toggleChat")
- div(role="dialog" aria-labelledby="inputChat")
+ input#modalChat.modal(
+ type="checkbox"
+ @click="resetChatColor()"
+ )
+ div#chatWrap(
+ role="dialog"
+ data-checkbox="modalChat"
+ )
#chat.card
label.modal-close(for="modalChat")
- Chat(:players="game.players" :pastChats="game.chats"
- @newchat-sent="finishSendChat" @newchat-received="processChat")
+ #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)")
+ | + @nonymous
+ Chat(
+ :players="game.players"
+ :pastChats="game.chats"
+ :newChat="newChat"
+ @mychat="processChat"
+ )
.row
- .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="offerDraw") Draw
- button(@click="abortGame") Abort
- button(@click="resign") Resign
- div Names: {{ game.players[0].name }} - {{ game.players[1].name }}
- div(v-if="game.score=='*'") Time: {{ virtualClocks[0] }} - {{ virtualClocks[1] }}
- BaseGame(:game="game" :vr="vr" ref="basegame"
- @newmove="processMove" @gameover="gameOver")
+ #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(
+ :game="game"
+ :vr="vr"
+ @newmove="processMove"
+ @gameover="gameOver"
+ )
-