diff --git a/restart_server.sh b/restart_server.sh old mode 100644 new mode 100755 diff --git a/static/index.html b/static/index.html index 8c56e95..9e193ec 100644 --- a/static/index.html +++ b/static/index.html @@ -1036,14 +1036,14 @@ πŸ“· Add / Find Asset
+ @@ -1875,6 +1875,7 @@ const username = document.getElementById('loginUsername').value.trim(); const password = document.getElementById('loginPassword').value; const errEl = document.getElementById('loginError'); + const loginBtn = document.getElementById('loginBtn'); if (!username || !password) { errEl.textContent = 'Please enter username and password'; @@ -1882,6 +1883,9 @@ return; } + loginBtn.disabled = true; + loginBtn.textContent = 'Signing in...'; + try { const remember = document.getElementById('loginRemember').checked; const result = await api('/api/auth/login', { @@ -1915,6 +1919,9 @@ } catch (e) { errEl.textContent = e.message || 'Login failed'; errEl.classList.add('show'); + } finally { + loginBtn.disabled = false; + loginBtn.textContent = 'Sign In'; } } @@ -2036,7 +2043,7 @@ t.className = 'toast' + (isError ? ' error' : ''); t.classList.add('show'); clearTimeout(toastTimer); - toastTimer = setTimeout(() => t.classList.remove('show'), 2000); + toastTimer = setTimeout(() => t.classList.remove('show'), 4000); } // =========================================================================