Fix: clear password fields after autofill delay and add autocomplete=off on login form
This commit is contained in:
parent
c771cc9054
commit
381ff6f7b2
3 changed files with 9 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
pediatric-scribe:
|
pediatric-scribe:
|
||||||
image: danielonyejesi/pediatric-ai-scribe-v3:v1.7
|
image: danielonyejesi/pediatric-ai-scribe-v3:v1.8
|
||||||
ports:
|
ports:
|
||||||
- "3552:3000"
|
- "3552:3000"
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Login Form -->
|
<!-- Login Form -->
|
||||||
<form id="login-form" class="auth-form">
|
<form id="login-form" class="auth-form" autocomplete="off">
|
||||||
<h2>Sign In</h2>
|
<h2>Sign In</h2>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Email</label>
|
<label>Email</label>
|
||||||
|
|
|
||||||
|
|
@ -97,20 +97,20 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
function exitApp() {
|
function exitApp() {
|
||||||
clearSession();
|
clearSession();
|
||||||
// Remove has-session class so auth screen CSS override is lifted
|
|
||||||
document.documentElement.classList.remove('has-session');
|
document.documentElement.classList.remove('has-session');
|
||||||
// Clear all auth input fields
|
|
||||||
['login-email', 'login-password', 'reg-name', 'reg-email', 'reg-password', 'login-totp'].forEach(function(id) {
|
|
||||||
var el = document.getElementById(id);
|
|
||||||
if (el) el.value = '';
|
|
||||||
});
|
|
||||||
// Clear URL hash
|
|
||||||
history.replaceState(null, '', window.location.pathname);
|
history.replaceState(null, '', window.location.pathname);
|
||||||
if (authScreen) authScreen.style.display = 'flex';
|
if (authScreen) authScreen.style.display = 'flex';
|
||||||
if (mainApp) mainApp.style.display = 'none';
|
if (mainApp) mainApp.style.display = 'none';
|
||||||
var adminTabBtn = document.getElementById('admin-tab-btn');
|
var adminTabBtn = document.getElementById('admin-tab-btn');
|
||||||
if (adminTabBtn) adminTabBtn.classList.add('hidden');
|
if (adminTabBtn) adminTabBtn.classList.add('hidden');
|
||||||
showLoginForm();
|
showLoginForm();
|
||||||
|
// Clear fields after browser autofill has had a chance to run
|
||||||
|
setTimeout(function() {
|
||||||
|
['login-email', 'login-password', 'reg-name', 'reg-email', 'reg-password', 'login-totp'].forEach(function(id) {
|
||||||
|
var el = document.getElementById(id);
|
||||||
|
if (el) el.value = '';
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearSession() {
|
function clearSession() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue