31 lines
No EOL
867 B
Text
31 lines
No EOL
867 B
Text
@page "/sys/modmenu"
|
|
@using ImageBoardServerApp.Auth
|
|
@inject AuthenticationStateProvider authStateProvider
|
|
@inject NavigationManager navManager
|
|
|
|
<AuthorizeView>
|
|
<Authorized>
|
|
<h3>ModMenu</h3>
|
|
<span>Welcome @mail to the mod menu</span>
|
|
<div>
|
|
<a href="/sys/reports">[Reports]</a>
|
|
<a href="/sys/users">[Users]</a>
|
|
</div>
|
|
</Authorized>
|
|
<NotAuthorized>
|
|
<DeadLink/>
|
|
</NotAuthorized>
|
|
</AuthorizeView>
|
|
@code {
|
|
private string mail { get; set; } = "";
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider;
|
|
var user = await cauthStateProvder.GetAuthenticationStateAsync();
|
|
if (user.User.Identity.IsAuthenticated)
|
|
{
|
|
mail = user.User.Identity.Name;
|
|
}
|
|
}
|
|
} |