Backend: - UserRecord Model + Users-Tabelle in DB - AuthService: SHA256-Passwort-Hashing, Token-Verwaltung (ConcurrentDictionary) - AuthMiddleware: Schützt alle /api/-Routes (außer /api/auth/login) - AuthEndpoint: Login, Logout, Me - Default-User admin/admin wird automatisch erstellt Frontend: - Login-Page mit Formular (Enter-Key-Support) - Globaler Fetch-Interceptor: 401 → automatisch Login-Redirect - Auth-Check beim App-Start und bei Hash-Änderungen - Logout-Link im Dashboard-Header - Login-CSS: Zentrierte Login-Box
37 lines
634 B
CSS
37 lines
634 B
CSS
/* ── Login Page ── */
|
|
|
|
.login-page {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.login-box {
|
|
width: 100%;
|
|
max-width: 340px;
|
|
}
|
|
|
|
.login-title {
|
|
text-align: center;
|
|
font-size: calc(var(--font-size) * 2);
|
|
margin-bottom: var(--box-spacing);
|
|
color: var(--fg);
|
|
}
|
|
|
|
.login-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.login-error {
|
|
background: rgb(from var(--dangerous) r g b / 0.15);
|
|
padding: var(--box-padding);
|
|
color: var(--dangerous);
|
|
border-radius: var(--border-radius);
|
|
text-align: center;
|
|
}
|