This commit is contained in:
@@ -2,29 +2,23 @@
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Dashboard</title>
|
||||
<title>Dashboard - Schic App</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h1>Dashboard</h1>
|
||||
<p>Login erfolgreich 🎉</p>
|
||||
<button id="logout">Logout</button>
|
||||
<p id="welcomeMessage">Willkommen …</p>
|
||||
|
||||
<button id="logoutBtn">Logout</button>
|
||||
|
||||
<h2>Todos</h2>
|
||||
<ul id="todosList"></ul>
|
||||
|
||||
<p id="errorMessage" class="error"></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const token = localStorage.getItem("token")
|
||||
|
||||
if (!token) {
|
||||
window.location.href = "login.html"
|
||||
}
|
||||
|
||||
document.getElementById("logout").addEventListener("click", () => {
|
||||
localStorage.removeItem("token")
|
||||
window.location.href = "login.html"
|
||||
})
|
||||
</script>
|
||||
|
||||
<!-- Lade das Dashboard‑Script -->
|
||||
<script type="module" src="dashboard.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user