fix error + format

This commit is contained in:
2025-04-29 00:29:00 +02:00
parent 3307f89d7d
commit 99f1890257
63 changed files with 9380 additions and 7015 deletions
+14 -14
View File
@@ -1,21 +1,21 @@
async function login() {
let r = (await post("/login",{
user: document.getElementById("user").value,
pass: document.getElementById("pass").value,
r: REDIRECT_URL
}))
if(!r.url.endsWith("/user") && !r.url.endsWith(REDIRECT_URL)) {
document.getElementById("pass").value = ""
console.error("login failed")
alert("Login failed, please make sure you have the right password")
return;
let r = await post('/login', {
user: document.getElementById('user').value,
pass: document.getElementById('pass').value,
r: REDIRECT_URL,
})
if (!r.url.endsWith('/user') && !r.url.endsWith(REDIRECT_URL)) {
document.getElementById('pass').value = ''
console.error('login failed')
alert('Login failed, please make sure you have the right password')
return
}
window.location = REDIRECT_URL || "/user"
window.location = REDIRECT_URL || '/user'
}
let passfield = document.getElementById("pass")
let passfield = document.getElementById('pass')
function passkeydown(e) {
if(e.code === "Enter") {
if (e.code === 'Enter') {
login()
}
}
}