diff --git a/web/auth.html b/web/auth.html index 566100df8..a98ced0c4 100644 --- a/web/auth.html +++ b/web/auth.html @@ -1,140 +1,192 @@ - - - - - Login to SilverBullet - - + } + } + + .flow { + display: flex; + flex-direction: column; + justify-content: flex-start; + } + + .flow>* { + margin-block: 0; + } + + .flow>*+* { + margin-block-start: var(--space, 1rem); + } + + - -
+ +
+

Login to SilverBullet

-
-
-
-
- - -
-
- - -
-
- - -
-
- -
+ +
+
+ + +
+
+ + +
+
+ +
+
- - - - - + const error = params.get("error"); + if (error === "0") { + document.querySelector(".error-message").innerText = + "The sent data was invalid"; + } else if (error === "1") { + document.querySelector(".error-message").innerText = + "Invalid username or password"; + } else if (error === "2") { + document.querySelector(".error-message").innerText = + "Too many invalid logins. Try again later"; + } + + const from = params.get("from"); + if (from) { + var input = document.createElement("input"); + input.setAttribute("type", "hidden"); + input.setAttribute("name", "from"); + input.setAttribute("value", from); + + document.getElementById("login").appendChild(input); + } + + + + \ No newline at end of file