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>
|
<p>Please enter password to access this website</p>
|
||||||
<input type="password" id="password" />
|
<input type="password" id="password" />
|
||||||
<button class="pure-button pure-button-primary" value="default">Log in</button>
|
<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>
|
</form>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
|
|
@ -234,12 +234,10 @@ const submitLogin = () => {
|
||||||
document.getElementById("container").style.filter = "blur(0px)"
|
document.getElementById("container").style.filter = "blur(0px)"
|
||||||
document.getElementById("login-dialog").close();
|
document.getElementById("login-dialog").close();
|
||||||
password.value = '';
|
password.value = '';
|
||||||
|
document.getElementById("wrong-pass").hidden = true;
|
||||||
refreshData();
|
refreshData();
|
||||||
} else {
|
} else {
|
||||||
const wrongPassBox = document.getElementById("wrong-pass");
|
document.getElementById("wrong-pass").hidden = false;
|
||||||
wrongPassBox.innerHTML = "Wrong password!";
|
|
||||||
wrongPassBox.style.color = "light-dark(red, #ff1a1a)";
|
|
||||||
wrongPassBox.hidden = false;
|
|
||||||
password.focus();
|
password.focus();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -139,6 +139,10 @@ div[name="links-div"] {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wrong-pass {
|
||||||
|
color: light-dark(red, #ff1a1a);
|
||||||
|
}
|
||||||
|
|
||||||
/* Settings for mobile devices */
|
/* Settings for mobile devices */
|
||||||
@media (pointer:none),
|
@media (pointer:none),
|
||||||
(pointer:coarse) {
|
(pointer:coarse) {
|
||||||
|
|
Loading…
Reference in a new issue