This commit is contained in:
2026-03-09 22:15:47 +00:00
parent e21acde732
commit 3b26f9b090
4 changed files with 12 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -7,7 +7,7 @@
<body>
<div class="center">
<form id="infoForm">
<h2>Personal Information</h2>
<h2>"Password Manager"</h2>
<hr>
<div class="inputGroup">
<p>Password Name</p>
@@ -22,7 +22,7 @@
<input type="checkbox" id="set" name="Set?">
</div>
<button type="submit">Submit</button>
<a href="/login">Log Out</a>
<a href="/login" id="logout">Log Out</a>
</form>
<div class="error">

View File

@@ -9,6 +9,10 @@ const errorMessage = document.querySelector(".error p");
const success = document.querySelector(".success");
const successMessage = document.querySelector(".success p");
const logoutLink = document.querySelector("#logout");
//logoutLink.onclick = logout;
openKeyDB();
const encryptionKey = await getEncryptionKey()
@@ -184,3 +188,9 @@ function base64ToBuffer(base64) {
}
return bytes;
}
function logout() {
localStorage.removeItem("token");
window.location.href = "/login"
}