diff --git a/src/app_logic.js b/src/app_logic.js index 0895a02..847c4ac 100644 --- a/src/app_logic.js +++ b/src/app_logic.js @@ -32,7 +32,6 @@ if (urlParams.get("login") != null) { urlParams.get("login").split(":")[1] ); //location.search = ""; - SetPages() } function open_page(params) { diff --git a/src/app_modules.js b/src/app_modules.js index 2940531..0c28790 100644 --- a/src/app_modules.js +++ b/src/app_modules.js @@ -1034,7 +1034,6 @@ function SetPages() { document.getElementById("appendApps2").append(a); } document.addEventListener("DOMContentLoaded", () => { - SetPages(); document.getElementById("appendApps").style.display = "none"; }); var Booted = false; @@ -1047,6 +1046,7 @@ setInterval(() => { document.getElementById("loading").style.display = "none"; toastr.error("Sin internet! Los cambios se sincronizarán cuando te vuelvas a conectar.") if (!SUB_LOGGED_IN) { + SetPages() open_page("login"); } else { open_page(location.hash.replace("#", "")); @@ -1059,6 +1059,7 @@ setInterval(() => { open_page("login"); return; } + SetPages() open_page(location.hash.replace("#", "")); } }, 1500); diff --git a/src/page/login.js b/src/page/login.js index 47862a5..b325818 100644 --- a/src/page/login.js +++ b/src/page/login.js @@ -37,6 +37,7 @@ PAGES.login = { SUB_LOGGED_IN_ID = document.getElementById(field_persona).value SUB_LOGGED_IN_DETAILS = SC_Personas[SUB_LOGGED_IN_ID] SUB_LOGGED_IN = true + SetPages() if (location.hash.replace("#", "").startsWith("login")) { open_page("index"); setUrlHash("index")