Добавьте файлы проекта.
This commit is contained in:
11
PlaylistShared.PWA2123/Pages/LoginDisplay.razor
Normal file
11
PlaylistShared.PWA2123/Pages/LoginDisplay.razor
Normal file
@@ -0,0 +1,11 @@
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<MudText Typo="Typo.body2" Class="d-inline mr-2">Hello, @context.User.Identity?.Name!</MudText>
|
||||
<MudButton Variant="Variant.Text" Color="Color.Inherit" OnClick="() => Navigation.NavigateTo("/logout")">Log out</MudButton>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<MudLink Href="/login" Color="Color.Inherit" Underline="Underline.Hover" Typo="Typo.body2">Log in</MudLink>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
Reference in New Issue
Block a user