mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +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();
|
||||
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 };
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import Remote from 'Remote/Admin/Fetch';
|
|||
import { SettingsAdminScreen } from 'Screen/Admin/Settings';
|
||||
import { LoginAdminScreen } from 'Screen/Admin/Login';
|
||||
|
||||
import { hideLoading, startScreens } from 'Knoin/Knoin';
|
||||
import { startScreens } from 'Knoin/Knoin';
|
||||
import { AbstractApp } from 'App/Abstract';
|
||||
|
||||
class AdminApp extends AbstractApp {
|
||||
|
|
@ -104,7 +104,7 @@ class AdminApp extends AbstractApp {
|
|||
AppStore.populate();
|
||||
CapaStore.populate();
|
||||
|
||||
hideLoading();
|
||||
this.hideLoading();
|
||||
|
||||
if (!rl.settings.app('allowAdminPanel')) {
|
||||
rl.route.root();
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ import { LoginUserScreen } from 'Screen/User/Login';
|
|||
import { MailBoxUserScreen } from 'Screen/User/MailBox';
|
||||
import { SettingsUserScreen } from 'Screen/User/Settings';
|
||||
|
||||
import { hideLoading, startScreens, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { startScreens, showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { AbstractApp } from 'App/Abstract';
|
||||
|
||||
|
|
@ -907,7 +907,7 @@ class AppUser extends AbstractApp {
|
|||
if (window.progressJs) {
|
||||
progressJs.end();
|
||||
}
|
||||
hideLoading();
|
||||
this.hideLoading();
|
||||
}
|
||||
|
||||
bootstart() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ let currentScreen = null,
|
|||
popupVisibilityNames = [];
|
||||
|
||||
const SCREENS = {},
|
||||
qs = s => document.querySelector(s),
|
||||
isNonEmptyArray = Array.isNotEmpty,
|
||||
autofocus = dom => {
|
||||
// if (!bMobileDevice) {
|
||||
|
|
@ -26,14 +25,6 @@ export const ViewType = {
|
|||
Center: 'Center'
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
export function hideLoading() {
|
||||
qs('#rl-content').hidden = false;
|
||||
qs('#rl-loading').remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Function} fExecute
|
||||
* @param {(Function|boolean|null)=} fCanExecute = true
|
||||
|
|
@ -125,7 +116,7 @@ function buildViewModel(ViewModelClass, vmScreen) {
|
|||
let vmDom = null;
|
||||
const vm = new ViewModelClass(vmScreen),
|
||||
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.__vm = vm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue