X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fviews%2FGame.vue;h=f93b5b3a17ca7728924daf9e90a24cdea53f1f45;hb=e71161fbfffe53b0f4b174e0467cdd98cc70b7b0;hp=2682a60a094170546ae84990f277be9247ed1970;hpb=bfe9a1357f43c2a2cc271e0f244f4785363d7961;p=vchess.git
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index 2682a60a..f93b5b3a 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,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"
+ )
@@ -595,6 +754,9 @@ export default {
color: grey
font-style: italic
+#playersInfo > p
+ margin: 0
+
@media screen and (min-width: 768px)
#actions
width: 300px
@@ -604,15 +766,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
@@ -629,7 +800,7 @@ export default {
#chat
padding-top: 20px
- max-width: 600px
+ max-width: 767px
border: none;
#chatBtn
@@ -643,4 +814,7 @@ export default {
.draw-threerep, .draw-threerep:hover
background-color: #e4d1fc
+
+.somethingnew
+ background-color: #c5fefe