diff --git a/templates/index.html b/templates/index.html index 4bc78ef..a89d5e9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -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();