Merge pull request 'Neue agb seite implementiert' (#6) from navbar_styling into main
Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
@@ -13,7 +13,11 @@
|
|||||||
|
|
||||||
<MudLayout>
|
<MudLayout>
|
||||||
<MudAppBar Elevation="0" Style="background: #0F172A; border-bottom: 1px solid rgba(255, 255, 255, 0.08);">
|
<MudAppBar Elevation="0" Style="background: #0F172A; border-bottom: 1px solid rgba(255, 255, 255, 0.08);">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="ToggleDrawer" Class="d-flex d-md-none mr-2" />
|
<AuthorizeView>
|
||||||
|
<Authorized>
|
||||||
|
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="ToggleDrawer" Class="d-flex d-md-none mr-2" />
|
||||||
|
</Authorized>
|
||||||
|
</AuthorizeView>
|
||||||
<MudSpacer />
|
<MudSpacer />
|
||||||
<MudIconButton Icon="@(_isDarkMode ? Icons.Material.Filled.LightMode : Icons.Material.Filled.DarkMode)"
|
<MudIconButton Icon="@(_isDarkMode ? Icons.Material.Filled.LightMode : Icons.Material.Filled.DarkMode)"
|
||||||
Color="Color.Inherit"
|
Color="Color.Inherit"
|
||||||
@@ -21,9 +25,13 @@
|
|||||||
Class="mr-2" />
|
Class="mr-2" />
|
||||||
</MudAppBar>
|
</MudAppBar>
|
||||||
|
|
||||||
<MudDrawer @bind-Open="_drawerOpen" ClipMode="DrawerClipMode.Never" Elevation="0" Variant="DrawerVariant.Mini" OpenMiniOnHover="false" Class="modern-drawer">
|
<AuthorizeView>
|
||||||
<NavMenu OnToggleDrawer="ToggleDrawer" />
|
<Authorized>
|
||||||
</MudDrawer>
|
<MudDrawer @bind-Open="_drawerOpen" ClipMode="DrawerClipMode.Never" Elevation="0" Variant="DrawerVariant.Mini" OpenMiniOnHover="false" Class="modern-drawer">
|
||||||
|
<NavMenu OnToggleDrawer="ToggleDrawer" />
|
||||||
|
</MudDrawer>
|
||||||
|
</Authorized>
|
||||||
|
</AuthorizeView>
|
||||||
|
|
||||||
<MudMainContent>
|
<MudMainContent>
|
||||||
<MudContainer MaxWidth="MaxWidth.Large" Class="mt-4 pb-8">
|
<MudContainer MaxWidth="MaxWidth.Large" Class="mt-4 pb-8">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="nav-container">
|
<div class="nav-container onboarding-nav-menu">
|
||||||
@* --- Brand / Logo Section --- *@
|
@* --- Brand / Logo Section --- *@
|
||||||
<div class="nav-header">
|
<div class="nav-header">
|
||||||
<div class="logo-wrapper">
|
<div class="logo-wrapper">
|
||||||
|
|||||||
@@ -119,26 +119,54 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* NavLink active state (Fixes active color contrast issue) */
|
/* NavLink active state (Fixes active color contrast issue) */
|
||||||
::deep .custom-nav-link.active {
|
::deep .custom-nav-link.active,
|
||||||
|
::deep .custom-nav-link .active {
|
||||||
background: linear-gradient(90deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.04) 100%) !important;
|
background: linear-gradient(90deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.04) 100%) !important;
|
||||||
font-weight: 600 !important;
|
font-weight: 600 !important;
|
||||||
box-shadow: inset 3px 0 0 #0EA5E9 !important;
|
box-shadow: inset 3px 0 0 #0EA5E9 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::deep .custom-nav-link.active,
|
::deep .custom-nav-link.active,
|
||||||
|
::deep .custom-nav-link .active,
|
||||||
::deep .custom-nav-link.active .mud-nav-link-text,
|
::deep .custom-nav-link.active .mud-nav-link-text,
|
||||||
::deep .custom-nav-link.active .mud-nav-link-icon-default {
|
::deep .custom-nav-link .active .mud-nav-link-text,
|
||||||
|
::deep .custom-nav-link.active .mud-nav-link-icon-default,
|
||||||
|
::deep .custom-nav-link .active .mud-nav-link-icon-default {
|
||||||
color: #0EA5E9 !important; /* Sky 500 */
|
color: #0EA5E9 !important; /* Sky 500 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Admin link color overrides */
|
/* Admin link color overrides & active state */
|
||||||
::deep .admin-link .mud-nav-link-icon-default {
|
::deep .admin-link .mud-nav-link-icon-default {
|
||||||
color: rgba(239, 68, 68, 0.7) !important; /* Red 500 */
|
color: rgba(239, 68, 68, 0.7) !important; /* Red 500 */
|
||||||
}
|
}
|
||||||
::deep .admin-link.active .mud-nav-link-icon-default {
|
|
||||||
|
::deep .admin-link.active,
|
||||||
|
::deep .admin-link .active {
|
||||||
|
background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.04) 100%) !important;
|
||||||
|
box-shadow: inset 3px 0 0 #EF4444 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .admin-link.active,
|
||||||
|
::deep .admin-link .active,
|
||||||
|
::deep .admin-link.active .mud-nav-link-text,
|
||||||
|
::deep .admin-link .active .mud-nav-link-text,
|
||||||
|
::deep .admin-link.active .mud-nav-link-icon-default,
|
||||||
|
::deep .admin-link .active .mud-nav-link-icon-default {
|
||||||
color: #EF4444 !important;
|
color: #EF4444 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Version link active state */
|
||||||
|
::deep .version-link.active,
|
||||||
|
::deep .version-link .active {
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .version-link.active .version-text,
|
||||||
|
::deep .version-link .active .version-text {
|
||||||
|
color: #0EA5E9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Footer Section */
|
/* Footer Section */
|
||||||
.nav-footer {
|
.nav-footer {
|
||||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
@page "/agb"
|
||||||
|
@rendermode InteractiveWebAssembly
|
||||||
|
@attribute [AllowAnonymous]
|
||||||
|
|
||||||
|
<PageTitle>AGB – Timetracker</PageTitle>
|
||||||
|
|
||||||
|
<MudContainer MaxWidth="MaxWidth.Medium" Class="mt-8 pb-8">
|
||||||
|
<MudStack Spacing="4">
|
||||||
|
|
||||||
|
@* ── Header ── *@
|
||||||
|
<MudPaper Elevation="4" Class="pa-5 rounded-xl" Style="background: #1E293B; color: white;">
|
||||||
|
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="3">
|
||||||
|
<MudIcon Icon="@Icons.Material.Filled.Gavel" Style="color: white; font-size: 2.2rem;" />
|
||||||
|
<MudStack Spacing="0">
|
||||||
|
<MudText Typo="Typo.h5" Style="color: white; font-weight: 700;">Allgemeine Geschäftsbedingungen (AGB)</MudText>
|
||||||
|
<MudText Typo="Typo.caption" Style="color: rgba(255,255,255,0.72);">
|
||||||
|
Rechtlich absolut unverbindliches Kauderwelsch und Flachwitze
|
||||||
|
</MudText>
|
||||||
|
</MudStack>
|
||||||
|
</MudStack>
|
||||||
|
</MudPaper>
|
||||||
|
|
||||||
|
@* ── Paragraphs with Flachwitze ── *@
|
||||||
|
<MudCard Elevation="2" Class="rounded-xl">
|
||||||
|
<MudCardContent>
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight: 700; color: var(--mud-palette-primary);" Class="mb-2">
|
||||||
|
§ 1 Geltungsbereich & Transparenz
|
||||||
|
</MudText>
|
||||||
|
<MudText Typo="Typo.body2" Class="mb-3">
|
||||||
|
Diese Bedingungen gelten für die gesamte Nutzung dieses Zeiterfassungs-Tools. Transparenz ist uns extrem wichtig.
|
||||||
|
</MudText>
|
||||||
|
<MudAlert Severity="Severity.Info" Dense="true" Class="rounded-lg">
|
||||||
|
<b>Warum können Geister eigentlich so schlecht lügen?</b><br />
|
||||||
|
Weil sie einfach extrem leicht zu durchschauen sind!
|
||||||
|
</MudAlert>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
|
||||||
|
<MudCard Elevation="2" Class="rounded-xl">
|
||||||
|
<MudCardContent>
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight: 700; color: var(--mud-palette-primary);" Class="mb-2">
|
||||||
|
§ 2 Pflichten des Nutzers & Gärtnerklauseln
|
||||||
|
</MudText>
|
||||||
|
<MudText Typo="Typo.body2" Class="mb-3">
|
||||||
|
Jeder Nutzer verpflichtet sich, seine Arbeitszeiten wahrheitsgemäß und pünktlich einzutragen. Bei Zuwiderhandlung behalten wir uns vor, den Garten des Nutzers aufzuräumen.
|
||||||
|
</MudText>
|
||||||
|
<MudAlert Severity="Severity.Normal" Dense="true" Class="rounded-lg" Style="border-left: 4px solid #EF6C00; background: rgba(239, 108, 0, 0.05);">
|
||||||
|
<b>Was sagt ein Gärtner, wenn er seinen Arbeitsplatz vorzeitig verlässt?</b><br />
|
||||||
|
"Ich mach mich dann mal vom Acker!"
|
||||||
|
</MudAlert>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
|
||||||
|
<MudCard Elevation="2" Class="rounded-xl">
|
||||||
|
<MudCardContent>
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight: 700; color: var(--mud-palette-primary);" Class="mb-2">
|
||||||
|
§ 3 Haftungsausschluss & Straßenverkehr
|
||||||
|
</MudText>
|
||||||
|
<MudText Typo="Typo.body2" Class="mb-3">
|
||||||
|
Wir übernehmen keinerlei Haftung für vergessene Pausenzeiten, verpasste Feierabende oder schlechtes Wetter.
|
||||||
|
</MudText>
|
||||||
|
<MudAlert Severity="Severity.Warning" Dense="true" Class="rounded-lg">
|
||||||
|
<b>Was ist rot, rund und steht am Straßenrand?</b><br />
|
||||||
|
Eine Spargelampel!<br /><br />
|
||||||
|
<b>Und warum dürfen Bienen eigentlich nicht in die Kirche?</b><br />
|
||||||
|
Weil sie in der Sekte sind!
|
||||||
|
</MudAlert>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
|
||||||
|
<MudCard Elevation="2" Class="rounded-xl">
|
||||||
|
<MudCardContent>
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight: 700; color: var(--mud-palette-primary);" Class="mb-2">
|
||||||
|
§ 4 Datensicherheit & Physikalische Grundgesetze
|
||||||
|
</MudText>
|
||||||
|
<MudText Typo="Typo.body2" Class="mb-3">
|
||||||
|
Ihre Daten werden nach modernsten Verschlüsselungsstandards (nicht) an Dritte weitergegeben. Unsere Magnetbänder sind streng gesichert.
|
||||||
|
</MudText>
|
||||||
|
<MudAlert Severity="Severity.Normal" Dense="true" Class="rounded-lg" Style="border-left: 4px solid #00897B; background: rgba(0, 137, 123, 0.05);">
|
||||||
|
<b>Treffen sich zwei Magnete im Rechenzentrum. Sagt der eine ganz verzweifelt:</b><br />
|
||||||
|
"Du, sag mal... Was soll ich heute bloß anziehen?"
|
||||||
|
</MudAlert>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
|
||||||
|
<MudCard Elevation="2" Class="rounded-xl">
|
||||||
|
<MudCardContent>
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight: 700; color: var(--mud-palette-primary);" Class="mb-2">
|
||||||
|
§ 5 Rückgaberecht & Büroalltag
|
||||||
|
</MudText>
|
||||||
|
<MudText Typo="Typo.body2" Class="mb-3">
|
||||||
|
Erfasste Arbeitszeiten können nicht zurückgenommen, umgetauscht oder bar ausgezahlt werden.
|
||||||
|
</MudText>
|
||||||
|
<MudAlert Severity="Severity.Normal" Dense="true" Class="rounded-lg" Style="border-left: 4px solid #5E35B1; background: rgba(94, 53, 177, 0.05);">
|
||||||
|
<b>Was macht ein gelangweilter Clown im Büro?</b><br />
|
||||||
|
Er macht Faxen!<br /><br />
|
||||||
|
<b>Und warum steht ein einsamer Pilz mitten im tiefen Wald?</b><br />
|
||||||
|
Weil die Tannen zapfen!
|
||||||
|
</MudAlert>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
|
||||||
|
<MudCard Elevation="2" Class="rounded-xl">
|
||||||
|
<MudCardContent>
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight: 700; color: var(--mud-palette-primary);" Class="mb-2">
|
||||||
|
§ 6 Schlussbestimmungen & Salatgesetze
|
||||||
|
</MudText>
|
||||||
|
<MudText Typo="Typo.body2" Class="mb-3">
|
||||||
|
Sollten einzelne Bestimmungen dieser AGB unwirksam sein, bleibt die Fröhlichkeit aller anderen Bestimmungen unberührt.
|
||||||
|
</MudText>
|
||||||
|
<MudAlert Severity="Severity.Success" Dense="true" Class="rounded-lg">
|
||||||
|
<b>Wie nennt man ein plötzlich spurlos verschwundenes Stück Rindfleisch?</b><br />
|
||||||
|
Gulasch!<br /><br />
|
||||||
|
<b>Was ist grün, gesund und klopft nachts an die Haustür?</b><br />
|
||||||
|
Ein Klopfsalat!<br /><br />
|
||||||
|
<b>Und zu guter Letzt: Warum fliegen Vögel im Winter eigentlich nach Süden?</b><br />
|
||||||
|
Weil es zu Fuß einfach viel zu weit wäre!
|
||||||
|
</MudAlert>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
|
||||||
|
@* ── Back Button ── *@
|
||||||
|
<MudStack Row="true" Justify="Justify.Center" Class="mt-4">
|
||||||
|
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.ArrowBack" OnClick="GoBack" Style="border-radius: 20px;">
|
||||||
|
Zurück zur Anmeldung
|
||||||
|
</MudButton>
|
||||||
|
</MudStack>
|
||||||
|
|
||||||
|
</MudStack>
|
||||||
|
</MudContainer>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Inject] private NavigationManager Nav { get; set; } = default!;
|
||||||
|
|
||||||
|
private void GoBack()
|
||||||
|
{
|
||||||
|
Nav.NavigateTo("/login");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
@page "/changelog"
|
@page "/changelog"
|
||||||
@rendermode InteractiveWebAssembly
|
@rendermode InteractiveWebAssembly
|
||||||
@attribute [Authorize]
|
@attribute [AllowAnonymous]
|
||||||
|
|
||||||
<PageTitle>Changelog – Timetracker</PageTitle>
|
<PageTitle>Changelog – Timetracker</PageTitle>
|
||||||
|
|
||||||
@@ -71,8 +71,9 @@
|
|||||||
new("1.4", "08.06.2026", true,
|
new("1.4", "08.06.2026", true,
|
||||||
[
|
[
|
||||||
new("Neu", "Timebot implementiert"),
|
new("Neu", "Timebot implementiert"),
|
||||||
|
new("Neu", "Onboarding Tour"),
|
||||||
new("Upgrade", "Security hardening"),
|
new("Upgrade", "Security hardening"),
|
||||||
new("Upgrade", "Changed coloring")
|
new("Upgrade", "Changed coloring"),
|
||||||
]),
|
]),
|
||||||
new("1.3", "08.06.2026", false,
|
new("1.3", "08.06.2026", false,
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
@inject IHolidayService HolidayService
|
@inject IHolidayService HolidayService
|
||||||
@inject ISnackbar Snackbar
|
@inject ISnackbar Snackbar
|
||||||
@inject AuthenticationStateProvider AuthStateProvider
|
@inject AuthenticationStateProvider AuthStateProvider
|
||||||
|
@inject IJSRuntime JSRuntime
|
||||||
|
|
||||||
<PageTitle>KW @_kw – Wochenübersicht – Timetracker</PageTitle>
|
<PageTitle>KW @_kw – Wochenübersicht – Timetracker</PageTitle>
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ else
|
|||||||
<MudStack Spacing="3">
|
<MudStack Spacing="3">
|
||||||
|
|
||||||
@* ── Wochen-Header ── *@
|
@* ── Wochen-Header ── *@
|
||||||
<MudPaper Elevation="4" Class="pa-5 rounded-xl"
|
<MudPaper Elevation="4" Class="pa-5 rounded-xl onboarding-week-header"
|
||||||
Style="background: #1E293B; color: white;">
|
Style="background: #1E293B; color: white;">
|
||||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.ChevronLeft"
|
<MudIconButton Icon="@Icons.Material.Filled.ChevronLeft"
|
||||||
@@ -93,7 +94,7 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
@* ── Arbeitstag: vollständige Karte ── *@
|
@* ── Arbeitstag: vollständige Karte ── *@
|
||||||
<MudCard @key="@day.Date" Elevation="@(isToday ? 6 : 2)" Class="rounded-xl"
|
<MudCard @key="@day.Date" Elevation="@(isToday ? 6 : 2)" Class="rounded-xl onboarding-day-card"
|
||||||
Style="@($"border-left: 4px solid {borderColor};")">
|
Style="@($"border-left: 4px solid {borderColor};")">
|
||||||
<MudCardHeader Style="@(isToday ? "background: linear-gradient(90deg, rgba(14,165,233,0.07) 0%, transparent 100%);" : "")">
|
<MudCardHeader Style="@(isToday ? "background: linear-gradient(90deg, rgba(14,165,233,0.07) 0%, transparent 100%);" : "")">
|
||||||
<CardHeaderContent>
|
<CardHeaderContent>
|
||||||
@@ -269,7 +270,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
@* ── Wochensumme ── *@
|
@* ── Wochensumme ── *@
|
||||||
<MudPaper Elevation="4" Class="pa-5 rounded-xl"
|
<MudPaper Elevation="4" Class="pa-5 rounded-xl onboarding-week-summary"
|
||||||
Style="background: #0F172A; color:white;">
|
Style="background: #0F172A; color:white;">
|
||||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Class="mb-4">
|
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Class="mb-4">
|
||||||
<MudIcon Icon="@Icons.Material.Filled.Summarize" Style="color:rgba(255,255,255,0.8)" />
|
<MudIcon Icon="@Icons.Material.Filled.Summarize" Style="color:rgba(255,255,255,0.8)" />
|
||||||
@@ -306,7 +307,7 @@ else
|
|||||||
</MudPaper>
|
</MudPaper>
|
||||||
|
|
||||||
@* ── Gleitzeitkonto ── *@
|
@* ── Gleitzeitkonto ── *@
|
||||||
<MudPaper Elevation="3" Class="pa-5 rounded-xl"
|
<MudPaper Elevation="3" Class="pa-5 rounded-xl onboarding-overtime-balance"
|
||||||
Style="@($"border-left: 6px solid {(_totalOvertime >= TimeSpan.Zero ? "#4CAF50" : "#FF9800")};")">
|
Style="@($"border-left: 6px solid {(_totalOvertime >= TimeSpan.Zero ? "#4CAF50" : "#FF9800")};")">
|
||||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Wrap="Wrap.Wrap" Spacing="3">
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Wrap="Wrap.Wrap" Spacing="3">
|
||||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
|
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
|
||||||
@@ -328,6 +329,11 @@ else
|
|||||||
</MudPaper>
|
</MudPaper>
|
||||||
|
|
||||||
</MudStack>
|
</MudStack>
|
||||||
|
|
||||||
|
@if (_showOnboarding)
|
||||||
|
{
|
||||||
|
<OnboardingTour OnFinished="HandleOnboardingFinished" />
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
@@ -347,6 +353,7 @@ else
|
|||||||
private TimeSpan _totalOvertime;
|
private TimeSpan _totalOvertime;
|
||||||
private Dictionary<DateOnly, string> _holidays = [];
|
private Dictionary<DateOnly, string> _holidays = [];
|
||||||
private int _holidayYear = -1;
|
private int _holidayYear = -1;
|
||||||
|
private bool _showOnboarding;
|
||||||
|
|
||||||
private bool IsCurrentWeek => _monday == GetMonday(DateOnly.FromDateTime(DateTime.Today));
|
private bool IsCurrentWeek => _monday == GetMonday(DateOnly.FromDateTime(DateTime.Today));
|
||||||
|
|
||||||
@@ -364,9 +371,26 @@ else
|
|||||||
|
|
||||||
await Task.WhenAll(loadWeekTask, overtimeTask);
|
await Task.WhenAll(loadWeekTask, overtimeTask);
|
||||||
_totalOvertime = await overtimeTask;
|
_totalOvertime = await overtimeTask;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var showOnb = await JSRuntime.InvokeAsync<string>("localStorage.getItem", "showOnboarding");
|
||||||
|
_showOnboarding = showOnb == "true";
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// Ignored during prerendering/SSR
|
||||||
|
}
|
||||||
|
|
||||||
_loading = false;
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task HandleOnboardingFinished()
|
||||||
|
{
|
||||||
|
_showOnboarding = false;
|
||||||
|
await JSRuntime.InvokeVoidAsync("localStorage.setItem", "showOnboarding", "false");
|
||||||
|
}
|
||||||
|
|
||||||
private async Task LoadWeek()
|
private async Task LoadWeek()
|
||||||
{
|
{
|
||||||
Task<List<PublicHoliday>> holidaysTask;
|
Task<List<PublicHoliday>> holidaysTask;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
@attribute [AllowAnonymous]
|
@attribute [AllowAnonymous]
|
||||||
@inject IAuthService AuthService
|
@inject IAuthService AuthService
|
||||||
@inject NavigationManager Nav
|
@inject NavigationManager Nav
|
||||||
|
@inject IJSRuntime JSRuntime
|
||||||
|
|
||||||
<PageTitle>Anmelden – Timetracker</PageTitle>
|
<PageTitle>Anmelden – Timetracker</PageTitle>
|
||||||
|
|
||||||
@@ -107,6 +108,11 @@
|
|||||||
Required="true"
|
Required="true"
|
||||||
HelperText="Mindestens 6 Zeichen" />
|
HelperText="Mindestens 6 Zeichen" />
|
||||||
<input type="text" style="display: none;" tabindex="-1" autocomplete="off" @bind="_honeypot" />
|
<input type="text" style="display: none;" tabindex="-1" autocomplete="off" @bind="_honeypot" />
|
||||||
|
|
||||||
|
<MudCheckBox @bind-Value="_acceptAgb" Color="Color.Secondary" Class="mt-1">
|
||||||
|
<MudText Typo="Typo.body2">Ich akzeptiere die <a href="/agb" target="_blank" style="color: var(--mud-palette-secondary); text-decoration: underline; font-weight: 600;">AGB</a>.</MudText>
|
||||||
|
</MudCheckBox>
|
||||||
|
|
||||||
<MudButton ButtonType="ButtonType.Submit"
|
<MudButton ButtonType="ButtonType.Submit"
|
||||||
Variant="Variant.Filled"
|
Variant="Variant.Filled"
|
||||||
Color="Color.Secondary"
|
Color="Color.Secondary"
|
||||||
@@ -114,7 +120,7 @@
|
|||||||
Size="Size.Large"
|
Size="Size.Large"
|
||||||
StartIcon="@Icons.Material.Filled.PersonAdd"
|
StartIcon="@Icons.Material.Filled.PersonAdd"
|
||||||
Class="mt-2"
|
Class="mt-2"
|
||||||
Disabled="_loading">
|
Disabled="_loading || !_acceptAgb">
|
||||||
@if (_loading)
|
@if (_loading)
|
||||||
{
|
{
|
||||||
<MudProgressCircular Size="Size.Small" Indeterminate="true" Class="mr-2" />
|
<MudProgressCircular Size="Size.Small" Indeterminate="true" Class="mr-2" />
|
||||||
@@ -134,6 +140,7 @@
|
|||||||
private string? _error;
|
private string? _error;
|
||||||
private bool _loading;
|
private bool _loading;
|
||||||
private string _honeypot = "";
|
private string _honeypot = "";
|
||||||
|
private bool _acceptAgb;
|
||||||
|
|
||||||
private readonly AuthModel _loginModel = new();
|
private readonly AuthModel _loginModel = new();
|
||||||
private readonly AuthModel _registerModel = new();
|
private readonly AuthModel _registerModel = new();
|
||||||
@@ -189,6 +196,11 @@
|
|||||||
|
|
||||||
private async Task HandleRegister()
|
private async Task HandleRegister()
|
||||||
{
|
{
|
||||||
|
if (!_acceptAgb)
|
||||||
|
{
|
||||||
|
_error = "Du musst die AGB akzeptieren.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
_loading = true;
|
_loading = true;
|
||||||
_error = null;
|
_error = null;
|
||||||
try
|
try
|
||||||
@@ -196,6 +208,7 @@
|
|||||||
var (user, error) = await AuthService.RegisterAsync(_registerModel.Username, _registerModel.Password, _honeypot);
|
var (user, error) = await AuthService.RegisterAsync(_registerModel.Username, _registerModel.Password, _honeypot);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
|
await JSRuntime.InvokeVoidAsync("localStorage.setItem", "showOnboarding", "true");
|
||||||
Nav.NavigateTo("/", forceLoad: true);
|
Nav.NavigateTo("/", forceLoad: true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -0,0 +1,179 @@
|
|||||||
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
|
@if (_active)
|
||||||
|
{
|
||||||
|
@* Dark Backdrop Overlay *@
|
||||||
|
<div class="onboarding-backdrop"></div>
|
||||||
|
|
||||||
|
@* Onboarding Instruction Card *@
|
||||||
|
<div class="onboarding-card-container">
|
||||||
|
<MudCard Class="onboarding-info-card pa-5 rounded-xl shadow-2xl">
|
||||||
|
<MudCardContent Class="pa-0">
|
||||||
|
<MudStack Spacing="3">
|
||||||
|
@* Header / Title *@
|
||||||
|
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
|
||||||
|
<MudIcon Icon="@Icons.Material.Filled.AutoAwesome" Style="color: #0EA5E9;" />
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight: 700; color: white;">
|
||||||
|
@_steps[_currentStep].Title
|
||||||
|
</MudText>
|
||||||
|
</MudStack>
|
||||||
|
|
||||||
|
@* Explanation Text *@
|
||||||
|
<MudText Typo="Typo.body2" Style="color: #CBD5E1; line-height: 1.6; min-height: 60px;">
|
||||||
|
@_steps[_currentStep].Content
|
||||||
|
</MudText>
|
||||||
|
|
||||||
|
@* Footer / Progress & Buttons *@
|
||||||
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="mt-2">
|
||||||
|
@* Step Count *@
|
||||||
|
<MudText Typo="Typo.caption" Style="color: #94A3B8; font-weight: 600;">
|
||||||
|
Schritt @(_currentStep + 1) von @_steps.Count
|
||||||
|
</MudText>
|
||||||
|
|
||||||
|
@* Navigation Button Stack *@
|
||||||
|
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.Center">
|
||||||
|
@if (_currentStep > 0)
|
||||||
|
{
|
||||||
|
<MudButton Variant="Variant.Text"
|
||||||
|
Style="color: #94A3B8; text-transform: none; border-radius: 12px;"
|
||||||
|
OnClick="PrevStep"
|
||||||
|
Size="Size.Small">
|
||||||
|
Zurück
|
||||||
|
</MudButton>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<MudButton Variant="Variant.Text"
|
||||||
|
Style="color: #94A3B8; text-transform: none; border-radius: 12px;"
|
||||||
|
OnClick="CompleteTour"
|
||||||
|
Size="Size.Small">
|
||||||
|
Überspringen
|
||||||
|
</MudButton>
|
||||||
|
}
|
||||||
|
|
||||||
|
<MudButton Variant="Variant.Filled"
|
||||||
|
Color="Color.Secondary"
|
||||||
|
Style="text-transform: none; border-radius: 12px; font-weight: 700; min-width: 80px;"
|
||||||
|
OnClick="NextStep"
|
||||||
|
Size="Size.Small">
|
||||||
|
@(_currentStep == _steps.Count - 1 ? "Fertig" : "Weiter")
|
||||||
|
</MudButton>
|
||||||
|
</MudStack>
|
||||||
|
</MudStack>
|
||||||
|
</MudStack>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Backdrop behind cards but below the spotlight highlight */
|
||||||
|
.onboarding-backdrop {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background: rgba(15, 23, 42, 0.4);
|
||||||
|
backdrop-filter: blur(2px);
|
||||||
|
z-index: 9999;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fixed positioned instruction box at the bottom center */
|
||||||
|
.onboarding-card-container {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 32px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 90%;
|
||||||
|
max-width: 480px;
|
||||||
|
z-index: 10001;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dark theme styling for the instruction card */
|
||||||
|
.onboarding-info-card {
|
||||||
|
background: rgba(15, 23, 42, 0.9) !important;
|
||||||
|
backdrop-filter: blur(16px) !important;
|
||||||
|
-webkit-backdrop-filter: blur(16px) !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08) !important;
|
||||||
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public EventCallback OnFinished { get; set; }
|
||||||
|
|
||||||
|
private bool _active = true;
|
||||||
|
private int _currentStep = 0;
|
||||||
|
|
||||||
|
private readonly List<OnboardingStep> _steps =
|
||||||
|
[
|
||||||
|
new(".onboarding-nav-menu", "Die Navigation", "Hier auf der linken Seite findest du das Hauptmenü. Du kannst ganz einfach zwischen der Wochen- und Monatsübersicht wechseln oder deine Statistiken einsehen."),
|
||||||
|
new(".onboarding-week-header", "Kalenderwoche blättern", "Hier siehst du die aktuell ausgewählte Woche. Verwende die Pfeiltasten links und rechts, um in vergangenen oder zukünftigen Wochen deine Zeiten zu erfassen."),
|
||||||
|
new(".onboarding-day-card", "Zeiterfassung pro Tag", "Das Herzstück des Timetrackers. Trage hier deine täglichen Start- und Endzeiten sowie deine Pausen ein. Das System errechnet die Zeiten und Überstunden in Echtzeit."),
|
||||||
|
new(".onboarding-week-summary", "Wochenzusammenfassung", "Hier siehst du auf einen Blick, wie viele Stunden du in dieser Woche gearbeitet hast, wie viel Pause du gemacht hast und wie sich dein Stundensaldo verändert hat."),
|
||||||
|
new(".onboarding-overtime-balance", "Gleitzeitkonto", "Hier wird dein gesamtes Gleitzeitkonto über das Jahr hinweg zusammengerechnet. So weißt du immer genau, wie viele Überstunden du angesammelt hast.")
|
||||||
|
];
|
||||||
|
|
||||||
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
|
{
|
||||||
|
if (firstRender)
|
||||||
|
{
|
||||||
|
await HighlightStep();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task HighlightStep()
|
||||||
|
{
|
||||||
|
if (_active && _steps.Count > 0)
|
||||||
|
{
|
||||||
|
var step = _steps[_currentStep];
|
||||||
|
await JS.InvokeVoidAsync("window.onboarding.highlight", step.TargetSelector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task NextStep()
|
||||||
|
{
|
||||||
|
if (_currentStep < _steps.Count - 1)
|
||||||
|
{
|
||||||
|
_currentStep++;
|
||||||
|
await HighlightStep();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await CompleteTour();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task PrevStep()
|
||||||
|
{
|
||||||
|
if (_currentStep > 0)
|
||||||
|
{
|
||||||
|
_currentStep--;
|
||||||
|
await HighlightStep();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task CompleteTour()
|
||||||
|
{
|
||||||
|
_active = false;
|
||||||
|
await JS.InvokeVoidAsync("window.onboarding.clear");
|
||||||
|
await OnFinished.InvokeAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class OnboardingStep
|
||||||
|
{
|
||||||
|
public string TargetSelector { get; }
|
||||||
|
public string Title { get; }
|
||||||
|
public string Content { get; }
|
||||||
|
|
||||||
|
public OnboardingStep(string targetSelector, string title, string content)
|
||||||
|
{
|
||||||
|
TargetSelector = targetSelector;
|
||||||
|
Title = title;
|
||||||
|
Content = content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,9 @@
|
|||||||
@inject IHolidayService HolidayService
|
@inject IHolidayService HolidayService
|
||||||
@inject ISnackbar Snackbar
|
@inject ISnackbar Snackbar
|
||||||
@inject AuthenticationStateProvider AuthStateProvider
|
@inject AuthenticationStateProvider AuthStateProvider
|
||||||
|
@inject IJSRuntime JSRuntime
|
||||||
|
@inject NavigationManager Nav
|
||||||
|
|
||||||
|
|
||||||
<PageTitle>Einstellungen – Timetracker</PageTitle>
|
<PageTitle>Einstellungen – Timetracker</PageTitle>
|
||||||
|
|
||||||
@@ -187,6 +190,33 @@ else
|
|||||||
</MudCard>
|
</MudCard>
|
||||||
</MudItem>
|
</MudItem>
|
||||||
|
|
||||||
|
@* ── Hilfe & Einführung ── *@
|
||||||
|
<MudItem xs="12" md="6">
|
||||||
|
<MudCard Elevation="3" Class="rounded-xl h-100">
|
||||||
|
<MudCardHeader>
|
||||||
|
<CardHeaderContent>
|
||||||
|
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
|
||||||
|
<MudIcon Icon="@Icons.Material.Filled.HelpOutline" Color="Color.Primary" />
|
||||||
|
<MudText Typo="Typo.h6" Style="font-weight:600">Hilfe & Einführung</MudText>
|
||||||
|
</MudStack>
|
||||||
|
</CardHeaderContent>
|
||||||
|
</MudCardHeader>
|
||||||
|
<MudCardContent>
|
||||||
|
<MudStack Spacing="4">
|
||||||
|
<MudText Typo="Typo.body2" Color="Color.Secondary">
|
||||||
|
Wenn du die interaktive Einführung (Onboarding Tour) noch einmal sehen möchtest, kannst du sie hier zurücksetzen und neu starten.
|
||||||
|
</MudText>
|
||||||
|
<MudButton Variant="Variant.Outlined" Color="Color.Primary"
|
||||||
|
StartIcon="@Icons.Material.Filled.PlayCircleOutline"
|
||||||
|
OnClick="RepeatOnboarding"
|
||||||
|
Style="max-width:250px;">
|
||||||
|
Onboarding wiederholen
|
||||||
|
</MudButton>
|
||||||
|
</MudStack>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
</MudItem>
|
||||||
|
|
||||||
</MudGrid>
|
</MudGrid>
|
||||||
|
|
||||||
@* ── Speichern-Button ── *@
|
@* ── Speichern-Button ── *@
|
||||||
@@ -578,6 +608,20 @@ else
|
|||||||
Snackbar.Add("Feiertag entfernt", Severity.Info);
|
Snackbar.Add("Feiertag entfernt", Severity.Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task RepeatOnboarding()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await JSRuntime.InvokeVoidAsync("localStorage.setItem", "showOnboarding", "true");
|
||||||
|
Snackbar.Add("Onboarding zurückgesetzt. Leite weiter zur Startseite...", Severity.Info);
|
||||||
|
Nav.NavigateTo("/");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Snackbar.Add($"Fehler beim Zurücksetzen des Onboardings: {ex.Message}", Severity.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static string FormatHours(double hours)
|
private static string FormatHours(double hours)
|
||||||
{
|
{
|
||||||
var ts = TimeSpan.FromHours(hours);
|
var ts = TimeSpan.FromHours(hours);
|
||||||
|
|||||||
@@ -13,6 +13,15 @@
|
|||||||
<ImportMap />
|
<ImportMap />
|
||||||
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
|
||||||
<link rel="alternate icon" type="image/png" href="favicon.png" />
|
<link rel="alternate icon" type="image/png" href="favicon.png" />
|
||||||
|
<style>
|
||||||
|
.onboarding-active-target {
|
||||||
|
position: relative !important;
|
||||||
|
z-index: 10000 !important;
|
||||||
|
box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.75), 0 0 15px rgba(14, 165, 233, 0.5) !important;
|
||||||
|
pointer-events: none !important;
|
||||||
|
transition: all 0.3s ease !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<HeadOutlet @rendermode="InteractiveWebAssembly" />
|
<HeadOutlet @rendermode="InteractiveWebAssembly" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -20,6 +29,25 @@
|
|||||||
<Routes />
|
<Routes />
|
||||||
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
||||||
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onboarding = {
|
||||||
|
highlight: function (selector) {
|
||||||
|
document.querySelectorAll('.onboarding-active-target').forEach(function(el) {
|
||||||
|
el.classList.remove('onboarding-active-target');
|
||||||
|
});
|
||||||
|
var target = document.querySelector(selector);
|
||||||
|
if (target) {
|
||||||
|
target.classList.add('onboarding-active-target');
|
||||||
|
target.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clear: function () {
|
||||||
|
document.querySelectorAll('.onboarding-active-target').forEach(function(el) {
|
||||||
|
el.classList.remove('onboarding-active-target');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user