This commit is contained in:
2026-03-24 10:32:41 +00:00
parent 2d792355ec
commit cbdbc07605

View File

@@ -930,32 +930,6 @@
return res;
}
function showLoginOverlay() {
document.getElementById('login-overlay').classList.remove('hidden');
document.getElementById('login-error').style.display = 'none';
}
async function attemptLogin() {
const input = document.getElementById('web-pass-input');
const pwd = input.value.trim();
if (!pwd) return;
const res = await fetch('/api/login', {
headers: { 'X-Web-Password': pwd }
});
if (res.ok) {
webPassword = pwd;
localStorage.setItem('vps_web_password', pwd);
document.getElementById('login-overlay').classList.add('hidden');
initDashboard();
} else {
document.getElementById('login-error').style.display = 'block';
input.value = '';
input.focus();
}
}
function initDashboard() {
fetchStats();
loadConfig();
@@ -1032,8 +1006,7 @@
}
}
}
setInterval(() => { if (!document.getElementById('login-overlay').classList.contains('hidden')) return; fetchStats(); }, 3000);
setInterval(() => { fetchStats(); }, 3000);
// Actions
async function executeAction(type) {
@@ -1537,9 +1510,7 @@
window.toggleRecording = toggleRecording;
// Auto-login se já tiver senha salva
// Autenticação desativada - Inicia direto
document.getElementById('login-overlay').classList.add('hidden');
// Inicia direto - Segurança suspensa
initDashboard();
</script>
</body>