2023-02-12 16:01:46 +00:00
|
|
|
@page "/sys/modmenu"
|
2023-02-07 20:21:38 +00:00
|
|
|
@using ImageBoardServerApp.Auth
|
|
|
|
@inject AuthenticationStateProvider authStateProvider
|
|
|
|
@inject NavigationManager navManager
|
|
|
|
|
|
|
|
<AuthorizeView>
|
|
|
|
<Authorized>
|
2023-02-12 16:01:46 +00:00
|
|
|
<h3>ModMenu</h3>
|
2023-02-07 20:21:38 +00:00
|
|
|
<span>Welcome @mail to the mod menu</span>
|
|
|
|
<div>
|
2023-02-12 16:01:46 +00:00
|
|
|
<a href="/sys/reports">[Reports]</a>
|
|
|
|
<a href="/sys/users">[Users]</a>
|
2023-02-07 20:21:38 +00:00
|
|
|
</div>
|
|
|
|
</Authorized>
|
|
|
|
<NotAuthorized>
|
2023-02-12 16:01:46 +00:00
|
|
|
<DeadLink/>
|
2023-02-07 20:21:38 +00:00
|
|
|
</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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|