Remove some titles, improve style. TODO: bug start new corr games
[vchess.git] / client / src / views / Game.vue
index dc6b817..b7cc1fc 100644 (file)
@@ -1,7 +1,7 @@
 <template lang="pug">
 main
   input#modalChat.modal(type="checkbox" @click="resetChatColor()")
-  div#chatWrap(role="dialog" data-checkbox="modalChat" aria-labelledby="inputChat")
+  div#chatWrap(role="dialog" data-checkbox="modalChat")
     #chat.card
       label.modal-close(for="modalChat")
       #participants
@@ -62,6 +62,7 @@ export default {
       },
       game: { //passed to BaseGame
         players:[{name:""},{name:""}],
+        chats: [],
         rendered: false,
       },
       virtualClocks: [0, 0], //initialized with true game.clocks
@@ -419,6 +420,8 @@ export default {
         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")
@@ -735,7 +738,7 @@ export default {
 
 #chat
   padding-top: 20px
-  max-width: 600px
+  max-width: 767px
   border: none;
 
 #chatBtn