2026-12-02 00:20:49 +01:00
|
|
|
@{
|
|
|
|
|
var role = User.FindFirst(ClaimTypes.Role)?.Value;
|
|
|
|
|
}
|
|
|
|
|
<div class="dropdown">
|
|
|
|
|
<button class="btn btn-link app-user-toggle dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
|
|
|
<span class="fw-semibold">@User.Identity?.Name</span>
|
|
|
|
|
<span class="badge app-role-badge ms-1">@UserRoles.DisplayName(role)</span>
|
|
|
|
|
</button>
|
|
|
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
|
|
|
<li><span class="dropdown-item-text small text-body-secondary">@User.FindFirst(ClaimTypes.Email)?.Value</span></li>
|
2026-12-02 00:31:07 +01:00
|
|
|
<li><a class="dropdown-item" asp-controller="Profile" asp-action="Index">Můj profil</a></li>
|
2026-12-03 00:49:36 +01:00
|
|
|
@if (User.IsInRole(UserRoles.Admin))
|
|
|
|
|
{
|
2026-12-04 17:30:17 +01:00
|
|
|
<li><a class="dropdown-item" asp-controller="AdminUsers" asp-action="Index">Správa uživatelů</a></li>
|
2026-12-03 00:49:36 +01:00
|
|
|
<li><a class="dropdown-item" href="~/swagger">Swagger API</a></li>
|
|
|
|
|
}
|
2026-12-02 00:26:42 +01:00
|
|
|
<li><hr class="dropdown-divider" /></li>
|
|
|
|
|
<li>
|
|
|
|
|
<form method="post" asp-controller="Account" asp-action="Logout">
|
|
|
|
|
<button type="submit" class="dropdown-item">Odhlásit se</button>
|
|
|
|
|
</form>
|
|
|
|
|
</li>
|
2026-12-02 00:20:49 +01:00
|
|
|
</ul>
|
|
|
|
|
</div>
|