mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 23:47:03 +03:00
Move hideLoading into AbstractApp
This commit is contained in:
parent
467f615713
commit
28fb9a4cbd
4 changed files with 15 additions and 14 deletions
|
|
@ -165,6 +165,16 @@ class AbstractApp {
|
||||||
LanguageStore.populate();
|
LanguageStore.populate();
|
||||||
ThemeStore.populate();
|
ThemeStore.populate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
hideLoading() {
|
||||||
|
const id = id => document.getElementById(id);
|
||||||
|
id('rl-content').hidden = false;
|
||||||
|
id('rl-loading').remove();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { AbstractApp, AbstractApp as default };
|
export { AbstractApp, AbstractApp as default };
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import Remote from 'Remote/Admin/Fetch';
|
||||||
import { SettingsAdminScreen } from 'Screen/Admin/Settings';
|
import { SettingsAdminScreen } from 'Screen/Admin/Settings';
|
||||||
import { LoginAdminScreen } from 'Screen/Admin/Login';
|
import { LoginAdminScreen } from 'Screen/Admin/Login';
|
||||||
|
|
||||||
import { hideLoading, startScreens } from 'Knoin/Knoin';
|
import { startScreens } from 'Knoin/Knoin';
|
||||||
import { AbstractApp } from 'App/Abstract';
|
import { AbstractApp } from 'App/Abstract';
|
||||||
|
|
||||||
class AdminApp extends AbstractApp {
|
class AdminApp extends AbstractApp {
|
||||||
|
|
@ -104,7 +104,7 @@ class AdminApp extends AbstractApp {
|
||||||
AppStore.populate();
|
AppStore.populate();
|
||||||
CapaStore.populate();
|
CapaStore.populate();
|
||||||
|
|
||||||
hideLoading();
|
this.hideLoading();
|
||||||
|
|
||||||
if (!rl.settings.app('allowAdminPanel')) {
|
if (!rl.settings.app('allowAdminPanel')) {
|
||||||
rl.route.root();
|
rl.route.root();
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ import { LoginUserScreen } from 'Screen/User/Login';
|
||||||
import { MailBoxUserScreen } from 'Screen/User/MailBox';
|
import { MailBoxUserScreen } from 'Screen/User/MailBox';
|
||||||
import { SettingsUserScreen } from 'Screen/User/Settings';
|
import { SettingsUserScreen } from 'Screen/User/Settings';
|
||||||
|
|
||||||
import { hideLoading, startScreens, showScreenPopup } from 'Knoin/Knoin';
|
import { startScreens, showScreenPopup } from 'Knoin/Knoin';
|
||||||
|
|
||||||
import { AbstractApp } from 'App/Abstract';
|
import { AbstractApp } from 'App/Abstract';
|
||||||
|
|
||||||
|
|
@ -907,7 +907,7 @@ class AppUser extends AbstractApp {
|
||||||
if (window.progressJs) {
|
if (window.progressJs) {
|
||||||
progressJs.end();
|
progressJs.end();
|
||||||
}
|
}
|
||||||
hideLoading();
|
this.hideLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstart() {
|
bootstart() {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ let currentScreen = null,
|
||||||
popupVisibilityNames = [];
|
popupVisibilityNames = [];
|
||||||
|
|
||||||
const SCREENS = {},
|
const SCREENS = {},
|
||||||
qs = s => document.querySelector(s),
|
|
||||||
isNonEmptyArray = Array.isNotEmpty,
|
isNonEmptyArray = Array.isNotEmpty,
|
||||||
autofocus = dom => {
|
autofocus = dom => {
|
||||||
// if (!bMobileDevice) {
|
// if (!bMobileDevice) {
|
||||||
|
|
@ -26,14 +25,6 @@ export const ViewType = {
|
||||||
Center: 'Center'
|
Center: 'Center'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
export function hideLoading() {
|
|
||||||
qs('#rl-content').hidden = false;
|
|
||||||
qs('#rl-loading').remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Function} fExecute
|
* @param {Function} fExecute
|
||||||
* @param {(Function|boolean|null)=} fCanExecute = true
|
* @param {(Function|boolean|null)=} fCanExecute = true
|
||||||
|
|
@ -125,7 +116,7 @@ function buildViewModel(ViewModelClass, vmScreen) {
|
||||||
let vmDom = null;
|
let vmDom = null;
|
||||||
const vm = new ViewModelClass(vmScreen),
|
const vm = new ViewModelClass(vmScreen),
|
||||||
position = ViewModelClass.__type || '',
|
position = ViewModelClass.__type || '',
|
||||||
vmPlace = position ? qs('#rl-content #rl-' + position.toLowerCase()) : null;
|
vmPlace = position ? document.querySelector('#rl-content #rl-' + position.toLowerCase()) : null;
|
||||||
|
|
||||||
ViewModelClass.__builded = true;
|
ViewModelClass.__builded = true;
|
||||||
ViewModelClass.__vm = vm;
|
ViewModelClass.__vm = vm;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue