From: Benjamin Auder Date: Wed, 12 Feb 2020 17:16:25 +0000 (+0100) Subject: Will remove Welcome div, finally X-Git-Url: https://git.auder.net/variants/%24%7Bvname%7D/%7B%7B%20asset%28%27mixstore/images/iris_pca.png%27%29%20%7D%7D?a=commitdiff_plain;h=9a3049f3a48fa4b3627ef26ccdf213a8e550d478;p=vchess.git Will remove Welcome div, finally --- diff --git a/client/src/App.vue b/client/src/App.vue index f4f0cf7c..e97fc410 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -14,7 +14,7 @@ nav label.drawer-toggle(for="drawerControl") input#drawerControl.drawer(type="checkbox") - #menuBar(@click="hideDrawer()") + #menuBar(@click="hideDrawer($event)") label.drawer-close(for="drawerControl") #leftMenu router-link(to="/") @@ -109,9 +109,6 @@ body .row > div padding: 0 -.nopadding - padding: 0 - header width: 100% display: flex @@ -128,24 +125,9 @@ header .text-center text-align: center -.smallpad - padding: 5px - -.emphasis - font-style: italic - .clearer clear: both -.smallfont - font-size: 0.8em - -.bigfont - font-size: 1.2em - -.bold - font-weight: bold - nav width: 100% margin: 0 @@ -243,16 +225,4 @@ footer @media screen and (max-width: 767px) footer border: none - -//#settings, #contactForm -// max-width: 767px -// @media screen and (max-width: 767px) -// max-width: 100vw -//[type="checkbox"].modal+div .card -// max-width: 767px -// max-height: 100vh -//[type="checkbox"].modal+div .card.small-modal -// max-width: 320px -//[type="checkbox"].modal+div .card.big-modal -// max-width: 90vw diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 45364053..a1539bab 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -1,18 +1,18 @@ @@ -58,9 +57,13 @@ export default { }, }, methods: { - deleteGame: function(game) { - if (confirm(this.st.tr["Remove game ?"])) - GameStorage.remove(game.id); + deleteGame: function(game, e) { + if (game.score != "*") + { + if (confirm(this.st.tr["Remove game?"])) + GameStorage.remove(game.id); + e.stopPropagation(); + } }, }, }; @@ -71,5 +74,5 @@ export default { tr.my-turn > td background-color: #fcd785 tr td.finished - background-color: red + background-color: #f5b7b1 diff --git a/client/src/components/Language.vue b/client/src/components/Language.vue index d35d8e21..e7243555 100644 --- a/client/src/components/Language.vue +++ b/client/src/components/Language.vue @@ -8,9 +8,9 @@ div }; input#modalLang.modal(type="checkbox") div(role="dialog" data-checkbox="modalLang") - #language.card + .card label.modal-close(for="modalLang") - form(@change="setLanguage") + form(@change="setLanguage($event)") fieldset label(for="langSelect") {{ st.tr["Language"] }} select#langSelect diff --git a/client/src/components/Settings.vue b/client/src/components/Settings.vue index b9a2b637..df60e04c 100644 --- a/client/src/components/Settings.vue +++ b/client/src/components/Settings.vue @@ -1,29 +1,30 @@ + + diff --git a/client/src/components/UpsertUser.vue b/client/src/components/UpsertUser.vue index 60970b08..3a0bb490 100644 --- a/client/src/components/UpsertUser.vue +++ b/client/src/components/UpsertUser.vue @@ -1,11 +1,11 @@ + + diff --git a/client/src/components/Welcome.vue b/client/src/components/Welcome.vue index 5f336e85..8c8ec4ca 100644 --- a/client/src/components/Welcome.vue +++ b/client/src/components/Welcome.vue @@ -36,6 +36,16 @@ export default { diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index dc6b817e..a5db1464 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -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") diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 42fd4767..bcc6cbab 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -9,7 +9,7 @@ main input#modalNewgame.modal(type="checkbox") div#newgameDiv(role="dialog" data-checkbox="modalNewgame" aria-labelledby="titleFenedit") - .card.smallpad(@keyup.enter="newChallenge") + .card.smallpad(@keyup.enter="newChallenge()") label#closeNewgame.modal-close(for="modalNewgame") fieldset label(for="selectVariant") {{ st.tr["Variant"] }} * @@ -44,9 +44,9 @@ main button(@click="setDisplay('c','corr',$event)") | {{ st.tr["Correspondance challenges"] }} ChallengeList(v-show="cdisplay=='live'" - :challenges="filterChallenges('live')" @click-challenge="clickChallenge()") + :challenges="filterChallenges('live')" @click-challenge="clickChallenge") ChallengeList(v-show="cdisplay=='corr'" - :challenges="filterChallenges('corr')" @click-challenge="clickChallenge()") + :challenges="filterChallenges('corr')" @click-challenge="clickChallenge") #people h3.text-center {{ st.tr["Who's there?"] }} #players @@ -60,7 +60,7 @@ main | {{ getActionLabel(sid) }} p.anonymous @nonymous ({{ anonymousCount }}) #chat - Chat(:newChat="newChat" @mychat="processChat") + Chat(:newChat="newChat" @mychat="processChat" :pastChats="[]") .clearer div .button-group diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index dbc6798d..5f9d6dd7 100644 --- a/client/src/views/Rules.vue +++ b/client/src/views/Rules.vue @@ -13,7 +13,7 @@ main button(v-if="display=='rules' && gameInfo.vname!='Dark'" @click="gotoAnalyze()") | {{ st.tr["Analyse"] }} - .section-content(v-show="display=='rules'" v-html="content") + div(v-show="display=='rules'" v-html="content") ComputerGame(v-show="display=='computer'" :game-info="gameInfo" @game-over="stopGame" @game-stopped="gameStopped") @@ -116,17 +116,6 @@ export default {