Dashboard, Services, Server, Settings, Userinfo Page auf Darkmode umgebaut

This commit is contained in:
2025-09-08 15:06:39 +02:00
parent ab6f99eb6b
commit 6e6d17b134
15 changed files with 154 additions and 98 deletions

View File

@@ -4,14 +4,20 @@
var Id = ViewBag.Id;
var preferredUsername = ViewBag.name;
var IdProvider = ViewBag.IdProvider;
var mail = ViewBag.mail;
}
<head>
<link rel="stylesheet" href="~/css/site.css" />
<link rel="stylesheet" href="~/css/user-info.css" />
</head>
<div class="container mt-5">
<div class="card shadow-lg rounded-3 p-4" style="max-width: 700px; margin: auto;">
<div class="text-center mb-4">
@if (!string.IsNullOrEmpty(pictureUrl))
{
<img src="@pictureUrl" alt="Profilbild" class="rounded-circle shadow" style="width: 120px; height: 120px; object-fit: cover;" />
<img src="@pictureUrl" alt="Profilbild" class="rounded-circle shadow picture" />
}
else
{
@@ -21,12 +27,12 @@
</div>
}
<h3 class="mt-3">
<i class="bi bi-person-circle me-1"></i>@preferredUsername
<i class="bi"></i>@preferredUsername
</h3>
</div>
<table class="table table-hover">
<table class="usertable">
<tbody>
<tr>
<th><i class="bi bi-person-badge me-1"></i>Username</th>
@@ -34,11 +40,11 @@
</tr>
<tr>
<th><i class="bi bi-envelope me-1"></i>E-Mail</th>
<td>@(ViewBag.Mail ?? "Nicht verfügbar")</td>
<td>@(mail ?? "Nicht verfügbar")</td>
</tr>
<tr>
<th><i class="bi bi-fingerprint me-1"></i>Benutzer-ID</th>
<td>@(ViewBag.Id ?? "Nicht verfügbar")</td>
<td>@(Id ?? "Nicht verfügbar")</td>
</tr>
@if(IdProvider != "local")
{
@@ -84,11 +90,6 @@
</tbody>
</table>
<div>
<form method="get" asp-controller="User" asp-action="UserSettings" class="text-center mt-4">
<button type="submit" class="btn btn-info">
<i class="bi bi-gear-wide-connected me-1"></i>Einstellungen
</button>
</form>
<form method="post" asp-controller="Auth" asp-action="Logout" class="text-center mt-4">
<button type="submit" class="btn btn-danger">
<i class="bi bi-box-arrow-right me-1"></i>Abmelden

View File

@@ -4,23 +4,13 @@
var preferredUsername = User.Claims.FirstOrDefault(c => c.Type == "preferred_username")?.Value ?? "admin";
var isLocalUser = ViewBag.IdentityProvider == "local";
var DbEngine = ViewBag.DbProvider;
var mail = ViewBag.mail;
}
<style>
.Settingscontainer {
display: flex;
flex-wrap: wrap;
/* Wichtig: erlaubt Umbruch */
gap: 1rem;
/* optionaler Abstand */
}
.Settingscontainer>* {
flex: 1 1 calc(50% - 0.5rem);
/* 2 Elemente pro Zeile, inkl. Gap */
box-sizing: border-box;
}
</style>
<head>
<link rel="stylesheet" href="~/css/site.css" />
<link rel="stylesheet" href="~/css/user-settings.css" />
</head>
<div class="Settingscontainer">
@if (isLocalUser)
@@ -40,7 +30,7 @@
<label for="ConfirmPassword" class="form-label">Passwort bestätigen</label>
<input type="password" class="form-control" id="ConfirmPassword" name="ConfirmPassword" />
</div>
<button type="submit" class="btn btn-primary">
<button type="submit" class="btn btn-db">
<i class="bi bi-save me-1"></i>Speichern
</button>
</form>
@@ -63,26 +53,26 @@
<hr class="my-4" />
<h5>Authentifizierungsmethode: </h5>
<p><strong>@(ViewBag.IdentityProvider ?? "nicht gefunden")</strong></p>
<h5>Authentifizierungsmethode: <strong>@(ViewBag.IdentityProvider ?? "nicht gefunden")</strong></h5>
<hr class="my-4" />
<h5>Datenbank-Engine: </h5>
<strong>@(DbEngine ?? "nicht gefunden")</strong>
<h5>Datenbank-Engine: <strong>@(DbEngine ?? "nicht gefunden")</strong></h5>
<!-- Falls Sqlite verwendet wird können Backups erstellt werden -->
@if (DbEngine == "Microsoft.EntityFrameworkCore.Sqlite")
{
<div class="d-flex gap-2">
<form asp-action="CreateSqlDump" method="post" asp-controller="Database">
<button type="submit" class="btn btn-primary">
<button type="submit" class="btn btn-db">
<i class="bi bi-save me-1"></i> Backup erstellen
</button>
</form>
<form asp-action="ManageSqlDumps" method="post" asp-controller="Database">
<button type="submit" class="btn btn-primary">
<button type="submit" class="btn btn-db">
<i class="bi bi-save me-1"></i> Backups verwalten
</button>
</form>
@@ -111,9 +101,8 @@
</div>
<div class="card shadow mt-5 p-4" style="width: 55%; margin: auto;">
<h4><i class="bi bi-pencil-square me-2"></i>Systemeinstellungen</h4>
<h4><i class="bi bi-pencil-square me-2"></i>Benachrichtungen</h4>
<h5>Benachrichtigungen: </h5>
<p>Registrierte E-Mail Adresse: <strong>@(ViewBag.mail ?? "nicht gefunden")</strong></p>
<!-- action="/Notification/UpdateSettings" existiert noch nicht-->
@@ -143,7 +132,7 @@
<label class="form-check-label" for="notifyMaintenance">Wartungsinformationen erhalten</label>
</div>
<button type="submit" class="btn btn-primary mt-3">
<button type="submit" class="btn btn-db mt-3">
<i class="bi bi-save me-1"></i>Speichern
</button>
</div>