mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 03:59:21 +03:00
Updated: dependencies
+ small fixes
This commit is contained in:
parent
760d9e6243
commit
ae996b75f1
16 changed files with 59 additions and 67 deletions
|
|
@ -25,33 +25,36 @@ const useJsNextBundle = (function() {
|
|||
}
|
||||
|
||||
/* eslint-disable */
|
||||
try {
|
||||
|
||||
eval(`
|
||||
// let + const
|
||||
const x = 5; let y = 4; var z = 4;
|
||||
|
||||
// Arrow Function
|
||||
const f = () => 'rainloop';
|
||||
|
||||
// Default + Rest + Spread
|
||||
const d = (test = 1, ...t) => 'rainloop';
|
||||
d(...[1, 2, 3]);
|
||||
|
||||
// Destructuring
|
||||
let [a, b] = [1, 2];
|
||||
({a, b} = {a: 1, b: 2});
|
||||
|
||||
// Class
|
||||
class Q1 { constructor() {} }
|
||||
|
||||
// Class extends + super
|
||||
class Q2 extends Q1 { constructor() { super() } }
|
||||
|
||||
`);
|
||||
return true;
|
||||
}
|
||||
catch (e) {}
|
||||
// try {
|
||||
//
|
||||
// (function() {
|
||||
// eval(`
|
||||
// // let + const
|
||||
//const x = 5; let y = 4; var z = 4;
|
||||
//
|
||||
// // Arrow Function
|
||||
//const f = () => 'rainloop';
|
||||
//
|
||||
// // Default + Rest + Spread
|
||||
//const d = (test = 1, ...t) => 'rainloop';
|
||||
//d(...[1, 2, 3]);
|
||||
//
|
||||
//// Destructuring
|
||||
//let [a, b] = [1, 2];
|
||||
//({a, b} = {a: 1, b: 2});
|
||||
//
|
||||
//// Class
|
||||
//class Q1 { constructor() {} }
|
||||
//
|
||||
//// Class extends + super
|
||||
//class Q2 extends Q1 { constructor() { super() } }
|
||||
//
|
||||
//`);
|
||||
// }());
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// catch (e) {}
|
||||
|
||||
return false;
|
||||
/* eslint-enable */
|
||||
|
|
@ -65,7 +68,7 @@ class Q2 extends Q1 { constructor() { super() } }
|
|||
function getComputedStyle(id, name)
|
||||
{
|
||||
const element = window.document.getElementById(id);
|
||||
return element.currentStyle ? element.currentStyle[name] :
|
||||
return element && element.currentStyle ? element.currentStyle[name] :
|
||||
(window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(name) : null);
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +109,9 @@ function includeLayout()
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {mixed} data
|
||||
* @param {boolean} admin = false
|
||||
* @param {boolean} mobile = false
|
||||
* @param {boolean} mobileDevice = false
|
||||
* @returns {void}
|
||||
*/
|
||||
function includeAppScr({admin = false, mobile = false, mobileDevice = false})
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ if (bAllowPdfPreview && window.navigator && window.navigator.mimeTypes)
|
|||
|
||||
export {bAllowPdfPreview};
|
||||
|
||||
export const aViewModels = {
|
||||
export const VIEW_MODELS = {
|
||||
settings: [],
|
||||
'settings-removed': [],
|
||||
'settings-disabled': []
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
|
||||
import $ from '$';
|
||||
import ko from 'ko';
|
||||
|
||||
import {isUnd} from 'Common/Utils';
|
||||
import {i18nToNodes} from 'Common/Translator';
|
||||
|
||||
class AbstractComponent
|
||||
{
|
||||
|
|
@ -35,7 +37,7 @@ const componentExportHelper = (ClassObject, templateID = '') => ({
|
|||
params.component = componentInfo;
|
||||
params.element = $(componentInfo.element);
|
||||
|
||||
require('Common/Translator').i18nToNodes(params.element);
|
||||
i18nToNodes(params.element);
|
||||
|
||||
if (!isUnd(params.inline) && ko.unwrap(params.inline))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
class AbstractBoot
|
||||
export class AbstractBoot
|
||||
{
|
||||
bootstart() {/* no-empty */}
|
||||
}
|
||||
|
||||
export {AbstractBoot, AbstractBoot as default};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
import _ from '_';
|
||||
import {isArray, disposeObject} from 'Common/Utils';
|
||||
|
||||
class AbstractModel
|
||||
export class AbstractModel
|
||||
{
|
||||
sModelName = '';
|
||||
disposables = [];
|
||||
|
|
@ -18,7 +17,7 @@ class AbstractModel
|
|||
regDisposables(value) {
|
||||
if (isArray(value))
|
||||
{
|
||||
_.each(value, (item) => {
|
||||
value.forEach((item) => {
|
||||
this.disposables.push(item);
|
||||
});
|
||||
}
|
||||
|
|
@ -32,5 +31,3 @@ class AbstractModel
|
|||
disposeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
export {AbstractModel, AbstractModel as default};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import _ from '_';
|
|||
import crossroads from 'crossroads';
|
||||
import {isArray, isNonEmptyArray, noop} from 'Common/Utils';
|
||||
|
||||
class AbstractScreen
|
||||
export class AbstractScreen
|
||||
{
|
||||
oCross = null;
|
||||
sScreenName;
|
||||
|
|
@ -57,7 +57,7 @@ class AbstractScreen
|
|||
fMatcher = _.bind(this.onRoute || noop, this);
|
||||
route = crossroads.create();
|
||||
|
||||
_.each(routes, (item) => {
|
||||
routes.forEach((item) => {
|
||||
if (item && route)
|
||||
{
|
||||
route.addRoute(item[0], fMatcher).rules = item[1];
|
||||
|
|
@ -68,5 +68,3 @@ class AbstractScreen
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {AbstractScreen, AbstractScreen as default};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {delegateRun, inFocus} from 'Common/Utils';
|
|||
import {KeyState, EventKeyCode} from 'Common/Enums';
|
||||
import {$win, keyScope} from 'Common/Globals';
|
||||
|
||||
class AbstractViewNext
|
||||
export class AbstractViewNext
|
||||
{
|
||||
bDisabeCloseOnEsc = false;
|
||||
sDefaultKeyScope = KeyState.None;
|
||||
|
|
@ -58,5 +58,3 @@ class AbstractViewNext
|
|||
cancelCommand() {} // eslint-disable-line no-empty-function
|
||||
closeCommand() {} // eslint-disable-line no-empty-function
|
||||
}
|
||||
|
||||
export {AbstractViewNext, AbstractViewNext as default};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import hasher from 'hasher';
|
|||
import crossroads from 'crossroads';
|
||||
|
||||
import {runHook} from 'Common/Plugins';
|
||||
import {$html, aViewModels as VIEW_MODELS, popupVisibilityNames} from 'Common/Globals';
|
||||
import {$html, VIEW_MODELS, popupVisibilityNames} from 'Common/Globals';
|
||||
|
||||
import {
|
||||
isArray, isUnd, pString, log, isFunc,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
import _ from '_';
|
||||
import Promise from 'Promise';
|
||||
import {isArray} from 'Common/Utils';
|
||||
|
||||
class AbstractBasicPromises
|
||||
export class AbstractBasicPromises
|
||||
{
|
||||
oPromisesStack = {};
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ class AbstractBasicPromises
|
|||
if (trigger)
|
||||
{
|
||||
value = !!value;
|
||||
_.each(isArray(trigger) ? trigger : [trigger], (fTrigger) => {
|
||||
(isArray(trigger) ? trigger : [trigger]).forEach((fTrigger) => {
|
||||
if (fTrigger)
|
||||
{
|
||||
fTrigger(value);
|
||||
|
|
@ -33,5 +32,3 @@ class AbstractBasicPromises
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {AbstractBasicPromises, AbstractBasicPromises as default};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import _ from '_';
|
|||
import $ from '$';
|
||||
import ko from 'ko';
|
||||
|
||||
import {aViewModels as VIEW_MODELS} from 'Common/Globals';
|
||||
import {VIEW_MODELS} from 'Common/Globals';
|
||||
import {delegateRun, windowResize, log, isUnd, pString} from 'Common/Utils';
|
||||
import {settings} from 'Common/Links';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue