mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
isArray to native Array.isArray
isUnd(*) to native undefined === *
isFunc to native typeof * === 'function'
isObject to native typeof * === 'object'
microtime() to native Date().getTime();
noop to native ()=>{}
noopFalse to native ()=>false
noopTrue to native ()=>true
boolToAjax to native *?'1':'0'
Underscore.js to native
This commit is contained in:
parent
fa39c7ecba
commit
ea48f5060b
72 changed files with 551 additions and 775 deletions
|
|
@ -1,12 +1,11 @@
|
|||
import window from 'window';
|
||||
import _ from '_';
|
||||
import ko from 'ko';
|
||||
import progressJs from 'progressJs';
|
||||
|
||||
import { root } from 'Common/Links';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { pInt, isNormal, isArray, isUnd } from 'Common/Utils';
|
||||
import { pInt, isNormal } from 'Common/Utils';
|
||||
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
|
|
@ -85,10 +84,10 @@ class AdminApp extends AbstractApp {
|
|||
}
|
||||
});
|
||||
|
||||
if (isArray(data.Result.List)) {
|
||||
if (Array.isArray(data.Result.List)) {
|
||||
list = data.Result.List.map(item => {
|
||||
if (item) {
|
||||
item.loading = ko.observable(!isUnd(loading[item.file]));
|
||||
item.loading = ko.observable(loading[item.file] !== undefined);
|
||||
return 'core' === item.type && !item.canBeInstalled ? null : item;
|
||||
}
|
||||
return null;
|
||||
|
|
@ -205,9 +204,9 @@ class AdminApp extends AbstractApp {
|
|||
setHash(root(), true);
|
||||
routeOff();
|
||||
|
||||
_.defer(() => {
|
||||
window.location.href = '/';
|
||||
});
|
||||
setTimeout(() =>
|
||||
window.location.href = '/'
|
||||
, 1);
|
||||
} else {
|
||||
if (Settings.settingsGet('Auth')) {
|
||||
startScreens([SettingsAdminScreen]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue