feat: added images for ban screen, added reportscreen, added reportsscreen for mods & admins
This commit is contained in:
parent
75d75a2c84
commit
cb7ca62590
43 changed files with 358 additions and 46 deletions
|
@ -10,8 +10,6 @@
|
|||
<PageFooter/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
@ -28,11 +26,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
<!--Admin -->
|
||||
<!--Moderator -->
|
||||
<!--Janitor -->
|
||||
|
||||
@code {
|
||||
|
||||
private List<PostData> posts;
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
<ul class="notesInfo">
|
||||
<li>The max. image size is 2MiB.</li>
|
||||
<li>Supported file types are: jpeg, png & gif</li>
|
||||
<li>Read the rules before posting</li>
|
||||
</ul>
|
||||
<div class="notesInfo">
|
||||
<span>The max. image size is 2MiB.</span>
|
||||
<br/>
|
||||
<span>Supported file types are: jpeg, png & gif</span>
|
||||
<br/>
|
||||
<div>
|
||||
<span>Read the </span>
|
||||
<a href="/rules">rules</a>
|
||||
<span> and </span>
|
||||
<a href="/faq">faq</a>
|
||||
<span> before posting</span>
|
||||
</div>
|
||||
</div>
|
47
ImageBoardServerApp/Shared/Components/Report.razor
Normal file
47
ImageBoardServerApp/Shared/Components/Report.razor
Normal file
|
@ -0,0 +1,47 @@
|
|||
@using System.ComponentModel.DataAnnotations
|
||||
<div>
|
||||
@if (report.Type == "op")
|
||||
{
|
||||
<span> /@report.ReportedPost.Board/ </span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> /@report.ReportedComment/ </span>
|
||||
}
|
||||
<span>#@report.ReportID</span>
|
||||
<span>@report.Type</span>
|
||||
<br/>
|
||||
<span>Reason: @report.ReportReason</span>
|
||||
<br/>
|
||||
<span>Explaination: @report.ReportExlaination</span>
|
||||
<br/>
|
||||
<a @onclick="@banTarget" href="javascript:void(0)">Ban Reported User</a>
|
||||
<br/>
|
||||
<a @onclick="@banReporter" href="javascript:void(0)" >Ban Reporter</a>
|
||||
<br/>
|
||||
@if (report.Type == "op")
|
||||
{
|
||||
<Post post="report.ReportedPost" showOpenThread="true"></Post>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Comment comment="report.ReportedComment"></Comment>
|
||||
}
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
[Required]
|
||||
public ReportData report { get; set; }
|
||||
|
||||
|
||||
private async Task banTarget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private async Task banReporter()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<h3>Reports</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
|
@ -15,15 +15,6 @@
|
|||
<div class="top-row px-4">
|
||||
<a href="/faq">[FAQ]</a>
|
||||
<a href="/rules">[Rules]</a>
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<a @onclick="logout" href="javascript:void(0)">[Logout @mail]</a>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<a href="/register">[Register]</a>
|
||||
<a href="/login">[Login]</a>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
|
||||
<article class="content px-4">
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
@using ImageBoardServerApp.Auth
|
||||
@inject AuthenticationStateProvider authStateProvider
|
||||
@inject NavigationManager navManager
|
||||
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">ImageBoard</a>
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<a class="navbar-brand" @onclick="logout" href="javascript:void(0)">[Logout]</a>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<a class="navbar-brand" href="/login">[Login]</a>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
@ -19,6 +31,21 @@
|
|||
<span class="oi oi-list-rich" aria-hidden="true"></span> /m/ - Main
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="tec">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> /tec/ - Technology
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="art">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> /art/ - Art
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="vg">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> /vg/ - Video Games
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
@ -31,5 +58,12 @@
|
|||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
|
||||
private async Task logout()
|
||||
{
|
||||
var customAuthStateProvider = (CustomAuthenticationStateProvider) authStateProvider;
|
||||
await customAuthStateProvider.UpdateAuthenticationStateAsync(null);
|
||||
navManager.NavigateTo("/", true);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue