Remove some titles, improve style. TODO: bug start new corr games
[vchess.git] / client / src / views / Hall.vue
index 9c06c4b..16af9c9 100644 (file)
@@ -1,15 +1,14 @@
 <template lang="pug">
 main
   input#modalInfo.modal(type="checkbox")
-  div#infoDiv(role="dialog" data-checkbox="modalInfo" aria-labelledby="infoMessage")
-    .card.smallpad.small-modal.text-center
+  div#infoDiv(role="dialog" data-checkbox="modalInfo")
+    .card.text-center
       label.modal-close(for="modalInfo")
-      h3#infoMessage.section
-        p(v-html="infoMessage")
+      h3.section
+      p(v-html="infoMessage")
   input#modalNewgame.modal(type="checkbox")
-  div#newgameDiv(role="dialog" data-checkbox="modalNewgame"
-      aria-labelledby="titleFenedit")
-    .card.smallpad(@keyup.enter="newChallenge")
+  div#newgameDiv(role="dialog" data-checkbox="modalNewgame")
+    .card(@keyup.enter="newChallenge()")
       label#closeNewgame.modal-close(for="modalNewgame")
       fieldset
         label(for="selectVariant") {{ st.tr["Variant"] }} *
@@ -31,7 +30,7 @@ main
       fieldset(v-if="st.user.id > 0 && newchallenge.to.length > 0")
         label(for="inputFen") FEN
         input#inputFen(type="text" v-model="newchallenge.fen")
-      button(@click="newChallenge") {{ st.tr["Send challenge"] }}
+      button(@click="newChallenge()") {{ st.tr["Send challenge"] }}
   .row
     .col-sm-12
       button#newGame(onClick="doClick('modalNewgame')") {{ st.tr["New game"] }}
@@ -39,9 +38,9 @@ main
     .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
       div
         .button-group
-          button(@click="(e) => setDisplay('c','live',e)" class="active")
+          button(@click="setDisplay('c','live',$event)" class="active")
             | {{ st.tr["Live challenges"] }}
-          button(@click="(e) => setDisplay('c','corr',e)")
+          button(@click="setDisplay('c','corr',$event)")
             | {{ st.tr["Correspondance challenges"] }}
         ChallengeList(v-show="cdisplay=='live'"
           :challenges="filterChallenges('live')" @click-challenge="clickChallenge")
@@ -60,13 +59,13 @@ main
               | {{ getActionLabel(sid) }}
           p.anonymous @nonymous ({{ anonymousCount }})
         #chat
-          Chat(:newChat="newChat" @mychat="processChat")
+          Chat(:newChat="newChat" @mychat="processChat" :pastChats="[]")
         .clearer
       div
         .button-group
-          button(@click="(e) => setDisplay('g','live',e)" class="active")
+          button(@click="setDisplay('g','live',$event)" class="active")
             | {{ st.tr["Live games"] }}
-          button(@click="(e) => setDisplay('g','corr',e)")
+          button(@click="setDisplay('g','corr',$event)")
             | {{ st.tr["Correspondance games"] }}
         GameList(v-show="gdisplay=='live'" :games="filterGames('live')"
           @show-game="showGame")
@@ -715,6 +714,14 @@ export default {
 #newGame
   display: block
   margin: 10px auto 5px auto
+
+#infoDiv > .card
+  max-width: 370px
+
+#newgameDiv > .card
+  max-width: 767px
+  max-height: 100%
+
 #people
   width: 100%
 #players