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
|
|
|
|
|
2023-02-13 17:45:14 +00:00
|
|
|
<AuthorizeView Roles="Admin,Mod">
|
2023-02-07 20:21:38 +00:00
|
|
|
<Authorized>
|
2023-02-12 16:01:46 +00:00
|
|
|
<h3>ModMenu</h3>
|
2023-06-12 16:51:25 +00:00
|
|
|
<span>Welcome User #@mail to the mod menu</span>
|
2023-02-07 20:21:38 +00:00
|
|
|
<div>
|
2023-03-11 01:50:07 +00:00
|
|
|
<a href="/sys/modmenu/reports">[Reports]</a>
|
|
|
|
<a href="/sys/modmenu/users">[Users]</a>
|
|
|
|
<a href="/sys/modmenu/boards">[Boards]</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>
|
2023-06-12 16:51:25 +00:00
|
|
|
|
2023-02-07 20:21:38 +00:00
|
|
|
@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;
|
|
|
|
}
|
|
|
|
}
|
2023-06-12 16:51:25 +00:00
|
|
|
|
2023-02-07 20:21:38 +00:00
|
|
|
}
|