Actualizar configuracion.html

This commit is contained in:
2026-03-14 19:52:29 +00:00
parent bf9944b1df
commit e260645c12

View File

@@ -1246,8 +1246,12 @@
const data = await res.json();
if(data.ok) {
data.credentials.forEach(c => {
const userInp = document.getElementById(`user_${c.provider.toLowerCase()}`);
const providerName = c.provider.toLowerCase();
const userInp = document.getElementById(`user_${providerName}`);
const autoInp = document.getElementById(`auto_${providerName}`); // <-- Busca el botón
if(userInp) userInp.value = c.username;
if(autoInp) autoInp.checked = c.auto_dispatch || false; // <-- Enciende o apaga
});
}
} catch(e) { console.error("Error creds"); }