From 962d137093d9f3f7175ed9b0ba105885ed007add Mon Sep 17 00:00:00 2001 From: Dmitrii Iurco Date: Sun, 7 Jun 2026 16:28:14 -0400 Subject: [PATCH] fix: lockout countdown shows NaN minutes The API returns locked_until already ending in 'Z' (UTC ISO format). Appending another 'Z' produces an invalid date string, so Date arithmetic yielded NaN. Remove the redundant suffix. Co-Authored-By: Claude Sonnet 4.6 --- webui/src/pages/Login.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui/src/pages/Login.jsx b/webui/src/pages/Login.jsx index 805c3e1..b6b1e0f 100644 --- a/webui/src/pages/Login.jsx +++ b/webui/src/pages/Login.jsx @@ -23,7 +23,7 @@ export default function Login() { if (err.response?.status === 423) { const lockedUntil = err.response?.data?.locked_until; if (lockedUntil) { - const mins = Math.ceil((new Date(lockedUntil + 'Z') - Date.now()) / 60000); + const mins = Math.ceil((new Date(lockedUntil) - Date.now()) / 60000); setError(`Account locked. Try again in ${mins} minute${mins !== 1 ? 's' : ''}.`); } else { setError('Account locked. Too many failed attempts. Try again later.');