X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=1294d50db85ac338b6b78bec30af326e686618c5;hb=725da57f8e2983d744629b524f9084516a43cbac;hp=7d4369beffef46d1dae4d49187454b111e79d7da;hpb=b1ea21493a31105d17cd600ff1d26ee6fd9e3f6f;p=vchess.git
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index 7d4369be..1294d50d 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1,25 +1,51 @@
main
- input#modalChat.modal(type="checkbox" @click="resetChatColor")
- 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,13 @@ 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(
+ ref="basegame"
+ :game="game"
+ :vr="vr"
+ @newmove="processMove"
+ @gameover="gameOver"
+ )
@@ -595,6 +756,9 @@ export default {
color: grey
font-style: italic
+#playersInfo > p
+ margin: 0
+
@media screen and (min-width: 768px)
#actions
width: 300px
@@ -604,10 +768,9 @@ 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)
@@ -617,6 +780,13 @@ export default {
#aboveBoard
margin-left: 30%
+.variant-cadence
+ padding-right: 10px
+
+.variant-name
+ font-weight: bold
+ padding-right: 10px
+
.name
font-size: 1.5rem
padding: 1px
@@ -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