diff --git a/templates/index.html b/templates/index.html index 6cb6f93..fe42e94 100644 --- a/templates/index.html +++ b/templates/index.html @@ -582,7 +582,16 @@ } } - #login-overlay { display: none !important; opacity: 0; pointer-events: none; } + #login-overlay { + position: fixed; + inset: 0; + background: #060a12; + z-index: 9999; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + } .login-card { width: 90%; @@ -650,6 +659,16 @@ +
+
+ + + + + + +
+
@@ -1509,8 +1528,28 @@ window.toggleRecording = toggleRecording; - // Inicia direto - Segurança suspensa - initDashboard(); + function checkAuth() { + const pass = document.getElementById('login-pass').value; + if (pass === '@@Gi05Br;;') { + sessionStorage.setItem('botAuth', 'true'); + document.getElementById('login-overlay').classList.add('hidden'); + initDashboard(); + } else { + document.getElementById('login-error').classList.remove('hidden'); + setTimeout(() => document.getElementById('login-error').classList.add('hidden'), 2000); + } + } + + // Enter key support + document.getElementById('login-pass').addEventListener('keypress', (e) => { + if (e.key === 'Enter') checkAuth(); + }); + + // Skip auth if already logged in via session + if (sessionStorage.getItem('botAuth') === 'true') { + document.getElementById('login-overlay').classList.add('hidden'); + initDashboard(); + }