From 130db3eff9afbf58b30287d06f3a2360fe652e97 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Tue, 11 Dec 2018 14:35:08 +0100 Subject: [PATCH] A few fixes (style, preferences application) --- public/javascripts/components/game.js | 17 +++++++++-------- public/stylesheets/variant.sass | 12 ++++++------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 860bab0c..c7ec715a 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -141,6 +141,7 @@ Vue.component('my-game', { "topindicator": true, "indic-right": true, "settings-btn": true, + "small": smallScreen, }, }, [h('i', { 'class': { "material-icons": true } }, "settings")] @@ -181,6 +182,9 @@ Vue.component('my-game', { }) ); // Create board element (+ reserves if needed by variant or mode) + const lm = this.vr.lastMove; + const showLight = this.hints && + (this.mode!="idle" || this.cursor==this.vr.moves.length); let gameDiv = h('div', { 'class': { 'game': true }, @@ -233,9 +237,6 @@ Vue.component('my-game', { ) ); } - const lm = this.vr.lastMove; - const showLight = this.hints && - (this.mode!="idle" || this.cursor==this.vr.moves.length); return h( 'div', { @@ -644,7 +645,7 @@ Vue.component('my-game', { h('label', { attrs: { for: "selectSound" }, - domProps: { innerHTML: "Sound level" }, + domProps: { innerHTML: "Play sounds?" }, }, ), h("select", @@ -657,7 +658,7 @@ Vue.component('my-game', { { domProps: { "value": "0", - innerHTML: "No sound" + innerHTML: "None" }, } ), @@ -665,7 +666,7 @@ Vue.component('my-game', { { domProps: { "value": "1", - innerHTML: "Newgame sound" + innerHTML: "Newgame" }, } ), @@ -673,7 +674,7 @@ Vue.component('my-game', { { domProps: { "value": "2", - innerHTML: "All sounds" + innerHTML: "All" }, } ), @@ -953,7 +954,7 @@ Vue.component('my-game', { setCookie("color", this.color); }, setSound: function(e) { - this.sound = e.target.options[e.target.selectedIndex].value; + this.sound = parseInt(e.target.options[e.target.selectedIndex].value); setCookie("sound", this.sound); }, clickGameSeek: function(e) { diff --git a/public/stylesheets/variant.sass b/public/stylesheets/variant.sass index 53412174..0ea9af42 100644 --- a/public/stylesheets/variant.sass +++ b/public/stylesheets/variant.sass @@ -157,6 +157,12 @@ figure.diagram-container > figcaption clear: both padding-top: 5px +.highlight + background-color: #00cc66 !important + +.incheck + background-color: #cc3300 !important + .light-square.lichess background-color: #f0d9b5; .dark-square.lichess @@ -170,12 +176,6 @@ figure.diagram-container > figcaption .dark-square.chesstempo background-color: #88a0a8; -.highlight - background-color: #00cc66 - -.incheck - background-color: #cc3300 - .light-square-diag background-color: #e5e5ca .dark-square-diag -- 2.44.0