This commit is contained in:
2026-05-25 16:23:22 +02:00
parent 3840ecf494
commit d83bc33fd9
4 changed files with 322 additions and 16 deletions

View File

@@ -114,6 +114,8 @@ async function initLoginPage() {
if (btn.disabled) return
errorEl.classList.add('hidden')
btn.disabled = true
btn.classList.add('is-loading')
btn.setAttribute('aria-busy', 'true')
let cooldownActive = false
try {
await api('/api/auth/login', {
@@ -132,6 +134,8 @@ async function initLoginPage() {
await applyCooldown(err.retryAfterSeconds || 900)
}
} finally {
btn.classList.remove('is-loading')
btn.removeAttribute('aria-busy')
if (!cooldownActive) btn.disabled = false
}
})