Improve WebUI login behavior

Closes #20441.
PR #20442.
---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
JayRet 2024-03-02 06:47:02 +00:00 committed by GitHub
parent 0114610a40
commit f265eb0166
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,7 +43,7 @@ function submitLoginForm(event) {
xhr.addEventListener('readystatechange', function() { xhr.addEventListener('readystatechange', function() {
if (xhr.readyState === 4) { // DONE state if (xhr.readyState === 4) { // DONE state
if ((xhr.status === 200) && (xhr.responseText === "Ok.")) if ((xhr.status === 200) && (xhr.responseText === "Ok."))
location.reload(true); location.replace(location);
else else
errorMsgElement.textContent = 'Invalid Username or Password.'; errorMsgElement.textContent = 'Invalid Username or Password.';
} }