bulletboards/ImageBoardServerApp/Pages/Moderation/ModMenu.razor
limited_dev dcc7634f5e feat: The posts are now sorted
fix: modmenu now checks for the permission, you now have to be 18yo to access the boards, images now get deleted when deleting threads / posts, fixed grammar error in the register page, other fixed which i forget
2023-02-13 18:45:14 +01:00

31 lines
No EOL
885 B
Text

@page "/sys/modmenu"
@using ImageBoardServerApp.Auth
@inject AuthenticationStateProvider authStateProvider
@inject NavigationManager navManager
<AuthorizeView Roles="Admin,Mod">
<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;
}
}
}