36 lines
921 B
HTML
36 lines
921 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<body>
|
|
|
|
<div id="content">
|
|
<h1>User Management</h1>
|
|
<p>Welcome, {{ email }}</p>
|
|
</div>
|
|
|
|
<div id="menu">
|
|
<button id="adminBtn">Admin</button>
|
|
<button id="logoutBtn">Logout</button>
|
|
</div>
|
|
|
|
<script>
|
|
document
|
|
.getElementById("logoutBtn")
|
|
.addEventListener("click", function () {
|
|
// Remove the cookie by setting its value to an empty string and its expiry date to the past.
|
|
document.cookie =
|
|
"access_token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
|
|
|
// Redirect to the login page.
|
|
window.location.href = "/web/login";
|
|
});
|
|
|
|
document
|
|
.getElementById("adminBtn")
|
|
.addEventListener("click", function () {
|
|
// Redirect to the admin page.
|
|
window.location.href = "/web/admin";
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|