More descriptive login screen

This commit is contained in:
2023-07-21 17:26:38 +01:00
parent bba55bfc0e
commit 31a96558bf

View File

@@ -1,4 +1,6 @@
async function login() {
// tell the user the app is loading
document.getElementById("loginSubmit").value = "Loading";
// this.preventDefault();
// get login details
let name = document.getElementById("name").value;
@@ -18,6 +20,8 @@ async function login() {
// else switch screen
if (response.status !== 200) {
document.getElementById("loginSubmit").classList.add("error");
document.getElementById("loginSubmit").value = "Failed";
return;
} else {
// switch screen
document.getElementById("login").setAttribute("style", "display: none;");