design
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user