This commit is contained in:
naielv
2025-08-11 15:31:34 +02:00
parent 9b9bd730dd
commit 7fb2d5f67f
2 changed files with 19 additions and 17 deletions

View File

@@ -1009,25 +1009,24 @@ document.addEventListener("DOMContentLoaded", () => {
});
var Booted = false;
getPeers();
if (window.navigator.onLine == false) {
Booted = true;
document.getElementById("loading").style.display = "none";
toastr.error("Sin internet! Los cambios se sincronizarán cuando te vuelvas a conectar.")
if (!SUB_LOGGED_IN) {
setUrlHash("login");
open_page("login");
} else {
document.getElementById("appendApps").style.display = "block";
open_page(location.hash.replace("#", ""));
}
}
setInterval(() => {
getPeers();
if (window.navigator.onLine == false) {
Booted = true;
document.getElementById("loading").style.display = "none";
toastr.error("Sin internet! Los cambios se sincronizarán cuando te vuelvas a conectar.")
if (!SUB_LOGGED_IN) {
open_page("login");
} else {
document.getElementById("appendApps").style.display = "block";
open_page(location.hash.replace("#", ""));
}
}
if (ConnectionStarted && !Booted) {
Booted = true;
document.getElementById("loading").style.display = "none";
if (!SUB_LOGGED_IN) {
setUrlHash("login");
open_page("login");
return;
}

View File

@@ -38,14 +38,17 @@ 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
setUrlHash("index")
setUrlHash("index")
setUrlHash("index")
if (!location.hash.replace("#", "").startsWith("login")) {
oppen_page("index");
setUrlHash("index")
} else{
open_page(location.hash.replace("#", ""));
}
document.getElementById("appendApps").style.display = "unset"
};
document.getElementById(btn_reload).onclick = () => {
setUrlHash("login," + safeuuid(""))
open_page("login")
};
},