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=ec1962ee4d744620004938f7e22ebb9b97faa9cc;hpb=dfeb96ea90e880a2557cbb5953dbb7258c912283;p=vchess.git
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index ec1962ee..0741d317 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1,25 +1,52 @@
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 }} st.tr["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)")
+ span.anonymous(v-if="Object.values(people).some(p => !p.name && p.id === 0)")
| + @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"
+ @chatcleared="clearChat"
+ )
.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}")
+ button(
+ @click="clickDraw()"
+ :class="{['draw-' + drawOffer]: true}"
+ )
| {{ st.tr["Draw"] }}
- button(@click="abortGame") {{ st.tr["Abort"] }}
- button(@click="resign") {{ st.tr["Resign"] }}
+ 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 +56,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(
+ ref="basegame"
+ :game="game"
+ @newmove="processMove"
+ @gameover="gameOver"
+ )
@@ -611,6 +883,9 @@ export default {
color: grey
font-style: italic
+#playersInfo > p
+ margin: 0
+
@media screen and (min-width: 768px)
#actions
width: 300px
@@ -620,10 +895,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)
@@ -633,6 +907,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
@@ -648,7 +929,7 @@ export default {
#chat
padding-top: 20px
- max-width: 600px
+ max-width: 767px
border: none;
#chatBtn
@@ -662,4 +943,7 @@ export default {
.draw-threerep, .draw-threerep:hover
background-color: #e4d1fc
+
+.somethingnew
+ background-color: #c5fefe