Add files via upload

This commit is contained in:
Jonas_Jones 2021-11-23 23:32:05 +01:00 committed by GitHub
parent 75684c5f91
commit 4a1ac1b789
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 338 additions and 1 deletions

20
login/js/auth.js Normal file
View file

@ -0,0 +1,20 @@
class Auth {
constructor() {
document.querySelector("body").style.display = "none";
const auth = localStorage.getItem("auth");
this.validateAuth(auth);
}
validateAuth(auth) {
if (auth != 1) {
window.location.replace("/");
} else {
document.querySelector("body").style.display = "block";
}
}
logOut() {
localStorage.removeItem("auth");
window.location.replace("/");
}
}