mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Remove progressJs bar because we are fast...
This commit is contained in:
parent
a8fd699575
commit
89b52b512f
6 changed files with 11 additions and 64 deletions
30
dev/boot.js
30
dev/boot.js
|
|
@ -42,7 +42,6 @@ const
|
|||
showError = () => {
|
||||
eId('rl-loading').hidden = true;
|
||||
eId('rl-loading-error').hidden = false;
|
||||
p.end();
|
||||
},
|
||||
|
||||
loadScript = src => {
|
||||
|
|
@ -51,29 +50,12 @@ const
|
|||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const script = doc.createElement('script');
|
||||
script.onload = () => {
|
||||
p.set(pStep += step);
|
||||
resolve();
|
||||
};
|
||||
script.onload = () => resolve();
|
||||
script.onerror = () => reject(new Error(src));
|
||||
script.src = src;
|
||||
// script.async = true;
|
||||
doc.head.append(script);
|
||||
});
|
||||
},
|
||||
|
||||
step = 100 / 7,
|
||||
p = win.progressJs = {
|
||||
set: percent => progress.style.width = Math.min(percent, 100) + '%',
|
||||
end: () => {
|
||||
if (progress) {
|
||||
p.set(100);
|
||||
setTimeout(() => {
|
||||
progress.remove();
|
||||
progress = null;
|
||||
}, 600);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!navigator || !navigator.cookieEnabled) {
|
||||
|
|
@ -83,10 +65,14 @@ if (!navigator || !navigator.cookieEnabled) {
|
|||
const layout = getCookie('rllayout');
|
||||
doc.documentElement.classList.toggle('rl-mobile', 'mobile' === layout || (!layout && 1000 > innerWidth));
|
||||
|
||||
let pStep = 0,
|
||||
progress = eId('progressjs'),
|
||||
let progress = eId('progressjs'),
|
||||
RL_APP_DATA = {};
|
||||
|
||||
if (progress) {
|
||||
progress.remove();
|
||||
progress = null;
|
||||
}
|
||||
|
||||
win.rl = {
|
||||
data: () => RL_APP_DATA,
|
||||
adminArea: () => admin,
|
||||
|
|
@ -125,8 +111,6 @@ win.rl = {
|
|||
}
|
||||
};
|
||||
|
||||
p.set(1);
|
||||
|
||||
Storage('local');
|
||||
|
||||
eId('app-css').href = eId('app-css').dataset.href;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue