mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-28 02:43:48 -06:00
commit
2ae80f9fc3
@ -41,28 +41,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>Copyright (c) 2022, LibreQoE LLC</footer>
|
||||
<footer>
|
||||
<a href="https://libreqos.io/credits/">Copyright (c) 2022, LibreQoE LLC</a>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
|
||||
function try_login() {
|
||||
let newUser = {
|
||||
username: $("#username").val(),
|
||||
password: $("#password").val(),
|
||||
};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/api/login",
|
||||
data: JSON.stringify(newUser),
|
||||
success: (data) => {
|
||||
if (data == "ERROR") {
|
||||
alert("Invalid login")
|
||||
} else {
|
||||
window.location.href = "/";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function start() {
|
||||
$("#btnLogin").on('click', (data) => {
|
||||
let newUser = {
|
||||
username: $("#username").val(),
|
||||
password: $("#password").val(),
|
||||
};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/api/login",
|
||||
data: JSON.stringify(newUser),
|
||||
success: (data) => {
|
||||
if (data == "ERROR") {
|
||||
alert("Invalid login")
|
||||
} else {
|
||||
window.location.href = "/";
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
$("#btnLogin").on('click', try_login)
|
||||
$(document).on('keydown', (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
try_login()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(start);
|
||||
|
@ -16,3 +16,4 @@
|
||||
.mbot8 { margin-bottom: 8px; }
|
||||
.row220 { height: 220px; }
|
||||
.redact { font-display: unset; }
|
||||
footer > a { color: white; }
|
||||
|
Loading…
Reference in New Issue
Block a user