From 9e38a59df3e895e535a9df9315e8dfc60d6f2cb4 Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Tue, 30 Aug 2016 23:24:02 +0300 Subject: [PATCH] Simple fixes --- dev/Common/Cmd.js | 38 +++++++++++++++++-- dev/Styles/Cmd.less | 3 +- dev/Styles/Login.less | 2 + .../0.0.0/app/templates/Themes/template.less | 11 ++++-- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/dev/Common/Cmd.js b/dev/Common/Cmd.js index b3595dd39..c1a575dd7 100644 --- a/dev/Common/Cmd.js +++ b/dev/Common/Cmd.js @@ -40,11 +40,40 @@ function cmdHelp(cmds) { return require('Html/Cmds/Help.html').replace('{{ commands }}', cmds.join(' ')); } +/** + * @returns {void} + */ +function initGlass() { + let state = null; + try { + if (window.localStorage && window.localStorage.setItem) + { + state = '1' === '' + window.localStorage.getItem('rl-labs-glass'); + } + } + catch (e) {} // eslint-disable-line no-empty + + if (null !== state) + { + $html.toggleClass('glass', !!state); + } +} + /** * @returns {string} */ function cmdGlass() { - $html.toggleClass('glass', !$html.hasClass('glass')); + const state = !$html.hasClass('glass'); + + try { + if (window.localStorage && window.localStorage.setItem) + { + window.localStorage.setItem('rl-labs-glass', state ? '1' : '0'); + } + } + catch (e) {} // eslint-disable-line no-empty + + $html.toggleClass('glass', state); return ''; } @@ -199,8 +228,8 @@ class CmdContoller onCmd(isTab) { const - cmdLine = trim(this.cmd()).replace(/[\s]+/, ' '), - cmdParts = cmdLine.replace().split(/[\s]+/), + cmdLine = this.cmd().replace(/[\s]+/, ' '), + cmdParts = trim(cmdLine).replace().split(/[\s]+/), cmd = cmdParts.shift(); if (isTab) @@ -348,3 +377,6 @@ export function toggle() }, 50); } } + +// init +initGlass(); diff --git a/dev/Styles/Cmd.less b/dev/Styles/Cmd.less index bad041b83..e9850467e 100644 --- a/dev/Styles/Cmd.less +++ b/dev/Styles/Cmd.less @@ -6,6 +6,7 @@ right: 0; top: auto; height: 0; + z-index: 10000; background: rgba(0, 0, 0, .85); border-top: 1px solid #000; @@ -16,7 +17,7 @@ .transition(height 0.1s ease-out); &.opened { - height: 300px; + height: 250px; } .rl-cmd-clr-error { diff --git a/dev/Styles/Login.less b/dev/Styles/Login.less index 1a0db5f28..698ae3580 100644 --- a/dev/Styles/Login.less +++ b/dev/Styles/Login.less @@ -72,6 +72,8 @@ font-size: 18px; height: 40px; line-height: 20px; + padding-left: 12px; + padding-right: 12px; } } diff --git a/rainloop/v/0.0.0/app/templates/Themes/template.less b/rainloop/v/0.0.0/app/templates/Themes/template.less index 71be5f207..c7848bc2e 100644 --- a/rainloop/v/0.0.0/app/templates/Themes/template.less +++ b/rainloop/v/0.0.0/app/templates/Themes/template.less @@ -259,11 +259,13 @@ html.glass { @glass-m-color: rgba(255, 255, 255, .8) !important; .thm-login { - border: none !important; background: none !important; - background: rgba(0, 0, 0, .3) !important; + background: rgba(0, 0, 0, .5) !important; box-shadow: none !important; + border: none !important; + border: 1px solid rgba(255, 255, 255, .2) !important; + .controls { .input-append .add-on i { color: @glass-m-color; @@ -272,8 +274,6 @@ html.glass { box-shadow: none !important; } - - input { border: 1px solid none !important; background: none !important; @@ -323,6 +323,9 @@ html.glass { color: @glass-color; border-color: @glass-m-color; + text-transform: uppercase; + font-size: 13px; + &:hover, &:active{ border-color: @glass-color; }