Actualizar configuracion.html
This commit is contained in:
@@ -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"); }
|
||||
|
||||
Reference in New Issue
Block a user