X-Git-Url: https://git.auder.net/parser.js?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=9a9710063932256181df338851688c41ba85d53b;hb=910d631b73cad5ffef1b4461157b704e7e7057d8;hp=e77492f0da0d212d04cd6bac2c4422341cdca0ed;hpb=ed06d9e92387e60fc15d7c9768dd5680605e35d1;p=vchess.git
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index e77492f0..9a971006 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1,25 +1,51 @@
main
- input#modalChat.modal(type="checkbox" @change="toggleChat")
- div#chatWrap(role="dialog" data-checkbox="modalChat"
- aria-labelledby="inputChat")
+ 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 }} participant(s):
- span(v-for="p in Object.values(people)" v-if="!!p.name")
+ 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-sent="finishSendChat" @newchat-received="processChat")
+ Chat(
+ :players="game.players"
+ :pastChats="game.chats"
+ :newChat="newChat"
+ @mychat="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
+ 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}") Draw
- button(@click="abortGame") Abort
- button(@click="resign") Resign
+ 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)}")
@@ -29,8 +55,12 @@ main
span.name(:class="{connected: isConnected(1)}")
| {{ game.players[1].name || "@nonymous" }}
span.time(v-if="game.score=='*'") {{ virtualClocks[1] }}
- BaseGame(:game="game" :vr="vr" ref="basegame"
- @newmove="processMove" @gameover="gameOver")
+ BaseGame(
+ :game="game"
+ :vr="vr"
+ @newmove="processMove"
+ @gameover="gameOver"
+ )
@@ -598,6 +756,9 @@ export default {
color: grey
font-style: italic
+#playersInfo > p
+ margin: 0
+
@media screen and (min-width: 768px)
#actions
width: 300px
@@ -607,15 +768,24 @@ export default {
#actions
display: inline-block
- margin-top: 10px
+ margin: 0
button
display: inline-block
- width: 33%
margin: 0
@media screen and (max-width: 767px)
#aboveBoard
text-align: center
+@media screen and (min-width: 768px)
+ #aboveBoard
+ margin-left: 30%
+
+.variant-cadence
+ padding-right: 10px
+
+.variant-name
+ font-weight: bold
+ padding-right: 10px
.name
font-size: 1.5rem
@@ -632,7 +802,7 @@ export default {
#chat
padding-top: 20px
- max-width: 600px
+ max-width: 767px
border: none;
#chatBtn
@@ -646,4 +816,7 @@ export default {
.draw-threerep, .draw-threerep:hover
background-color: #e4d1fc
+
+.somethingnew
+ background-color: #c5fefe