<template lang="pug">
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.variant-info {{ game.vname }}
button#chatBtn(onClick="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(v-if="!!game.mycolor" @click="abortGame") {{ st.tr["Abort"] }}
- button(v-if="!!game.mycolor" @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)}")
},
game: { //passed to BaseGame
players:[{name:""},{name:""}],
+ chats: [],
rendered: false,
},
virtualClocks: [0, 0], //initialized with true game.clocks
this.vr = new V(game.fen);
const gtype = (game.cadence.indexOf('d') >= 0 ? "corr" : "live");
const tc = extractTime(game.cadence);
+ if (!game.chats)
+ game.chats = []; //live games don't have chat history
if (gtype == "corr")
{
if (game.players[0].color == "b")
#chat
padding-top: 20px
- max-width: 600px
+ max-width: 767px
border: none;
#chatBtn