1
0
Fork 0
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:
Sayantan Santra 2025-03-05 15:56:12 -06:00
parent 5363a1b056
commit 3b48ce7b5e
Signed by: SinTan1729
GPG key ID: 0538DD402EA50898
3 changed files with 7 additions and 5 deletions

View file

@ -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>&nbsp;</p>
<p id="wrong-pass" hidden>Wrong password!</p>
</form>
</dialog>

View file

@ -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();
}
})

View file

@ -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) {