mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-22 13:53:14 +08:00
Simple fixes
This commit is contained in:
parent
b28d4f8cf3
commit
9e38a59df3
4 changed files with 46 additions and 8 deletions
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -72,6 +72,8 @@
|
|||
font-size: 18px;
|
||||
height: 40px;
|
||||
line-height: 20px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue