2025-11-06 10:20:00 +01:00
|
|
|
@page "/dashboard"
|
2025-11-09 19:39:52 +01:00
|
|
|
@using DiunaBI.UI.Shared.Services
|
2025-11-06 10:20:00 +01:00
|
|
|
@using MudBlazor
|
2025-11-09 19:39:52 +01:00
|
|
|
@inject AuthService AuthService
|
|
|
|
|
@inject NavigationManager NavigationManager
|
2025-11-06 10:20:00 +01:00
|
|
|
|
2025-11-09 19:39:52 +01:00
|
|
|
@if (AuthService.IsAuthenticated && AuthService.CurrentUser != null)
|
|
|
|
|
{
|
|
|
|
|
<MudCard Class="mt-4" Elevation="2">
|
|
|
|
|
<MudCardHeader>
|
|
|
|
|
<CardHeaderAvatar>
|
|
|
|
|
@if (!string.IsNullOrEmpty(AuthService.CurrentUser.AvatarUrl))
|
|
|
|
|
{
|
|
|
|
|
<MudAvatar Size="Size.Large" Style="background: transparent;">
|
|
|
|
|
<img src="@AuthService.CurrentUser.AvatarUrl" alt="Avatar" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%;" />
|
|
|
|
|
</MudAvatar>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MudAvatar Color="Color.Primary" Size="Size.Large">
|
|
|
|
|
@(AuthService.CurrentUser.FullName.Length > 0 ? AuthService.CurrentUser.FullName.Substring(0, 1) : "?")
|
|
|
|
|
</MudAvatar>
|
|
|
|
|
}
|
|
|
|
|
</CardHeaderAvatar>
|
|
|
|
|
<CardHeaderContent>
|
|
|
|
|
<MudText Typo="Typo.h6">@AuthService.CurrentUser.FullName</MudText>
|
|
|
|
|
<MudText Typo="Typo.body2">@AuthService.CurrentUser.Email</MudText>
|
|
|
|
|
</CardHeaderContent>
|
|
|
|
|
</MudCardHeader>
|
|
|
|
|
<MudCardContent>
|
|
|
|
|
<MudText Typo="Typo.body2">
|
|
|
|
|
✅ Zalogowano przez Google
|
|
|
|
|
</MudText>
|
|
|
|
|
</MudCardContent>
|
|
|
|
|
</MudCard>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MudAlert Severity="Severity.Warning" Class="mt-4">
|
|
|
|
|
Nie jesteś zalogowany
|
|
|
|
|
</MudAlert>
|
|
|
|
|
}
|