Merge language into index template

This commit is contained in:
djmaze 2021-04-26 12:19:47 +02:00
parent c3c1fc2c0e
commit fb98ca6fe7
10 changed files with 354 additions and 300 deletions

View file

@ -149,7 +149,6 @@ win.rl = {
}
loadScript(appData.StaticLibJsLink)
.then(() => Promise.all([loadScript(appData.TemplatesLink), loadScript(appData.LangLink)]))
.then(() => loadScript(appData.StaticAppJsLink))
.then(() => appData.PluginsLink ? loadScript(appData.PluginsLink) : Promise.resolve())
.then(() => win.__APP_BOOT ? win.__APP_BOOT(showError) : showError())

12
dev/bootstrap.js vendored
View file

@ -1,4 +1,4 @@
import { doc, elementById, dropdownVisibility, Settings } from 'Common/Globals';
import { doc, dropdownVisibility, Settings } from 'Common/Globals';
import { i18n } from 'Common/Translator';
import { root } from 'Common/Links';
@ -135,15 +135,9 @@ export default (App) => {
});
};
window.__APP_BOOT = fErrorCallback => {
window.__APP_BOOT = () => {
const cb = () => setTimeout(() => {
if (rl.TEMPLATES) {
elementById('rl-templates').innerHTML = rl.TEMPLATES;
setTimeout(() => App.bootstart(), 10);
} else {
fErrorCallback();
}
setTimeout(() => App.bootstart(), 10);
window.__APP_BOOT = null;
}, 10);
('loading' !== doc.readyState) ? cb() : doc.addEventListener('DOMContentLoaded', cb);