mirror of
https://github.com/SinTan1729/chhoto-url
synced 2025-03-14 05:04:40 -05:00
chg: Simplify how wrong password text is shown
This commit is contained in:
parent
5363a1b056
commit
3b48ce7b5e
3 changed files with 7 additions and 5 deletions
|
@ -78,7 +78,7 @@
|
|||
<p>Please enter password to access this website</p>
|
||||
<input type="password" id="password" />
|
||||
<button class="pure-button pure-button-primary" value="default">Log in</button>
|
||||
<p id="wrong-pass" hidden> </p>
|
||||
<p id="wrong-pass" hidden>Wrong password!</p>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -234,12 +234,10 @@ const submitLogin = () => {
|
|||
document.getElementById("container").style.filter = "blur(0px)"
|
||||
document.getElementById("login-dialog").close();
|
||||
password.value = '';
|
||||
document.getElementById("wrong-pass").hidden = true;
|
||||
refreshData();
|
||||
} else {
|
||||
const wrongPassBox = document.getElementById("wrong-pass");
|
||||
wrongPassBox.innerHTML = "Wrong password!";
|
||||
wrongPassBox.style.color = "light-dark(red, #ff1a1a)";
|
||||
wrongPassBox.hidden = false;
|
||||
document.getElementById("wrong-pass").hidden = false;
|
||||
password.focus();
|
||||
}
|
||||
})
|
||||
|
|
|
@ -139,6 +139,10 @@ div[name="links-div"] {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
#wrong-pass {
|
||||
color: light-dark(red, #ff1a1a);
|
||||
}
|
||||
|
||||
/* Settings for mobile devices */
|
||||
@media (pointer:none),
|
||||
(pointer:coarse) {
|
||||
|
|
Loading…
Reference in a new issue