Release glass style

This commit is contained in:
RainLoop Team 2016-09-15 23:34:30 +03:00
parent 7ffa5af91f
commit 155f4b6df2
12 changed files with 36 additions and 69 deletions

View file

@ -332,6 +332,11 @@ class AbstractApp extends AbstractBoot
leftPanelDisabled(false);
});
if (Settings.appSettingsGet('loginGlassStyle'))
{
$html.addClass('glass');
}
if (!mobile)
{
ssm.addState({

View file

@ -3,7 +3,7 @@ import window from 'window';
import $ from '$';
import _ from '_';
import ko from 'ko';
import {$html, $body} from 'Common/Globals';
import {$body} from 'Common/Globals';
import {EventKeyCode, Magics} from 'Common/Enums';
import {trim, inArray, changeTheme} from 'Common/Utils';
import {reload as translatorReload} from 'Common/Translator';
@ -40,43 +40,6 @@ 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() {
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 '';
}
/**
* @returns {string}
*/
@ -124,7 +87,7 @@ class CmdContoller
cmdHelper = ko.observable('');
cmds = ['help', 'version', 'glass', 'clear', 'theme', 'lang'];
cmds = ['help', 'version', 'clear', 'theme', 'lang'];
cmdsWithParameters = ['theme', 'lang'];
isAdmin = false;
@ -205,9 +168,6 @@ class CmdContoller
case 'help':
result = cmdHelp(this.cmds);
break;
case 'glass':
result = cmdGlass();
break;
case 'v':
case 'version':
result = cmdVersion();
@ -390,6 +350,3 @@ export function toggle()
}, Magics.Time50ms);
}
}
// init
initGlass();

View file

@ -1,5 +1,6 @@
import ko from 'ko';
import moment from 'moment';
import {settingsGet} from 'Storage/Settings';
import {showScreenPopup} from 'Knoin/Knoin';
@ -60,7 +61,6 @@ class LicensingPremAdminSettings
*/
licenseExpiredMomentValue() {
const
moment = require('moment'),
time = this.licenseExpired(),
momentUnix = moment.unix(time);

View file

@ -59,7 +59,7 @@
}
.wrapper {
padding: 40px 40px 12px 40px;
padding: 40px 40px 20px 40px;
}
#recaptcha_image img {
@ -102,6 +102,12 @@
font-size: 17px;
line-height: 29px;
color: #999;
&.login-submit-icon{
font-size: 24px;
padding-top: 2px;
cursor: pointer;
}
}
.controls.error .add-on i, .control-group.error .add-on i {

View file

@ -174,6 +174,10 @@ html.rgba .g-ui-resizable-delimiter-highlight {
}
}
.display-none {
display: none;
}
.e-spinner {
display: none;
}

View file

@ -36,7 +36,7 @@ import {view, command, ViewType, routeOff, showScreenPopup} from 'Knoin/Knoin';
import {AbstractViewNext} from 'Knoin/AbstractViewNext';
@view({
name: 'View/User/Login',
name: ['View/App/Login', 'View/User/Login'],
type: ViewType.Center,
templateID: 'Login'
})
@ -83,7 +83,6 @@ class LoginUserView extends AbstractViewNext
this.emailFocus = ko.observable(false);
this.passwordFocus = ko.observable(false);
this.submitFocus = ko.observable(false);
this.email.subscribe(() => {
this.emailError(false);
@ -335,7 +334,7 @@ class LoginUserView extends AbstractViewNext
onShowWithDelay() {
if ('' !== this.email() && '' !== this.password())
{
this.submitFocus(true);
this.passwordFocus(true);
}
else if ('' === this.email())
{
@ -352,7 +351,6 @@ class LoginUserView extends AbstractViewNext
}
onHide() {
this.submitFocus(false);
this.emailFocus(false);
this.passwordFocus(false);
}