1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2025-04-19 19:30:01 -05:00

Compare commits

...

2 commits

4 changed files with 8 additions and 6 deletions

View file

@ -45,7 +45,7 @@ for small. URL means, well... URL. So the name simply means Small URL.
stays under 5MB under normal use.) stays under 5MB under normal use.)
- Counts number of hits for each short link in a privacy respecting way - Counts number of hits for each short link in a privacy respecting way
i.e. only the hit is recorded, and nothing else. i.e. only the hit is recorded, and nothing else.
- Has a mobile friendly UI. - Has a mobile friendly UI, and automatic dark mode.
- Has a public mode, where anyone can add links without authentication. Deleting - Has a public mode, where anyone can add links without authentication. Deleting
or listing available links will need admin access using the password. or listing available links will need admin access using the password.
- Allows setting the URL of your website, in case you want to conveniently - Allows setting the URL of your website, in case you want to conveniently

View file

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

View file

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

View file

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