Доработан UI
This commit is contained in:
@@ -2,18 +2,23 @@
|
||||
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<MudText Typo="Typo.body2" Class="d-inline mr-2">Здравствуйте, @context.User.Identity?.Name!</MudText>
|
||||
<MudButton Variant="Variant.Text" Color="Color.Inherit" OnClick="BeginLogOut">Выйти</MudButton>
|
||||
<MudMenu Label="@context.User.Identity?.Name" Variant="Variant.Text" Color="Color.Inherit" Class="user-menu">
|
||||
<MudMenuItem OnClick="GoToProfile">Профиль</MudMenuItem>
|
||||
<MudMenuItem OnClick="BeginLogOut">Выйти</MudMenuItem>
|
||||
</MudMenu>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<MudLink Href="/login" Color="Color.Inherit" Underline="Underline.Hover" Typo="Typo.body2">Вход</MudLink>
|
||||
<MudText Class="d-inline mx-1">|</MudText>
|
||||
<MudLink Href="/register" Color="Color.Inherit" Underline="Underline.Hover" Typo="Typo.body2">Регистрация</MudLink>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
|
||||
@code {
|
||||
public void BeginLogOut()
|
||||
private void GoToProfile()
|
||||
{
|
||||
Navigation.NavigateTo("/profile");
|
||||
}
|
||||
|
||||
private void BeginLogOut()
|
||||
{
|
||||
Navigation.NavigateTo("/logout");
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Authorized>
|
||||
<MudNavLink Href="/profile" Icon="@Icons.Material.Filled.Person">Профиль</MudNavLink>
|
||||
<MudNavLink Href="/my-playlists" Icon="@Icons.Material.Filled.QueueMusic">Мои плейлисты</MudNavLink>
|
||||
<MudNavLink Href="/favorites" Icon="@Icons.Material.Filled.Favorite">Избранное</MudNavLink>
|
||||
<MudNavLink Href="/favorites" Icon="@Icons.Material.Filled.Star">Избранное</MudNavLink>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
</MudNavMenu>
|
||||
Reference in New Issue
Block a user