diff --git a/jstrr.js b/jstrr.js index 1b8da9a..3f27576 100644 --- a/jstrr.js +++ b/jstrr.js @@ -463,6 +463,7 @@ } } } else if (data.tmpkey) { + input.disabled = false; if (data.email) { loginhead.innerText = "Sent passcode to "+data.email; prompt.innerText = "Passcode" @@ -477,7 +478,7 @@ } else if ("step" in data) { finishTrr(data); } else if (data.fail) { - + input.disabled = false; switch (data.fail) { case "fail": loginhead.innerHTML = "Invalid passcode
Try again "; @@ -485,6 +486,10 @@ input.value = ""; input.focus(); break; + case "byebye": + loginhead.innerHTML = "Too many login failure... Reloading "; + setTimeout(logout, 2000); + break; case "nokey": // alert("Ooops - session forcibly been timeout") _reset(); @@ -616,6 +621,7 @@ input.value = "" sendJSONtoServer(j); + input.disabled = true; } }; tryLogin();