Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:45:01 +02:00
commit f4a01d6a69
11601 changed files with 4206660 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
const submit = document.getElementById("submit");
submit.onclick = async function() {
const username = document.getElementById("username").value;
const password = document.getElementById("password").value;
const response = await sendGetRequest(hostname + "/api/users/login?username=" + username + "&password=" + password);
if (response !== "false") {
sessionStorage.setItem("sessionKey", response);
sessionKey = response;
location.href = hostname;
}else {
showSnackbar();
}
}
function showSnackbar() {
document.getElementById('snackbar')?.classList.add('show');
setTimeout(() => {document.getElementById('snackbar')?.classList.remove('show');}, 5000);
}