fix: fixed minor issues
This commit is contained in:
parent
6a1287495d
commit
d8fcc93394
5 changed files with 18 additions and 2 deletions
|
@ -12,7 +12,9 @@
|
||||||
<Comment comment="comment"/>
|
<Comment comment="comment"/>
|
||||||
<hr/>
|
<hr/>
|
||||||
}
|
}
|
||||||
|
<div class="Form">
|
||||||
<CommentForm post="post"/>
|
<CommentForm post="post"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
|
|
3
ImageBoardServerApp/Pages/Basic/ThreadPage.razor.css
Normal file
3
ImageBoardServerApp/Pages/Basic/ThreadPage.razor.css
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
.Form{
|
||||||
|
text-align: center;
|
||||||
|
}
|
|
@ -39,7 +39,7 @@ using (var serviceScope = app.Services.CreateScope())
|
||||||
context.Database.EnsureCreated();
|
context.Database.EnsureCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageThumbnailOptions options = new ImageThumbnailOptions("wwwroot/img/", "wwwroot/img/thumb");
|
ImageThumbnailOptions options = new ImageThumbnailOptions("wwwroot/img/", "thumb");
|
||||||
options.ImageQuality = 75L;
|
options.ImageQuality = 75L;
|
||||||
app.UseImageThumbnail(options);
|
app.UseImageThumbnail(options);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
@using System.ComponentModel.DataAnnotations
|
@using System.ComponentModel.DataAnnotations
|
||||||
@using ImageBoardServerApp.Data.Repository
|
@using ImageBoardServerApp.Data.Repository
|
||||||
|
@inject NavigationManager navigationManager
|
||||||
<div>
|
<div>
|
||||||
@if (report.Type == "op")
|
@if (report.Type == "op")
|
||||||
{
|
{
|
||||||
|
@ -38,6 +39,8 @@
|
||||||
<span> </span>
|
<span> </span>
|
||||||
<a @onclick="() => banReporter(99999999)" href="javascript:void(0)">99M Tage</a>
|
<a @onclick="() => banReporter(99999999)" href="javascript:void(0)">99M Tage</a>
|
||||||
<br/>
|
<br/>
|
||||||
|
<a @onclick="@removeReport" href="javascript:void(0)" >Done</a>
|
||||||
|
<br/>
|
||||||
@if (report.Type == "op")
|
@if (report.Type == "op")
|
||||||
{
|
{
|
||||||
<Post post="report.ReportedPost" showOpenThread="true"></Post>
|
<Post post="report.ReportedPost" showOpenThread="true"></Post>
|
||||||
|
@ -59,6 +62,7 @@
|
||||||
UserData user = report.UserReported;
|
UserData user = report.UserReported;
|
||||||
user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds();
|
user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds();
|
||||||
await UsersRepository.updateUserAsync(user);
|
await UsersRepository.updateUserAsync(user);
|
||||||
|
await removeReport();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task banReporter(int days)
|
private async Task banReporter(int days)
|
||||||
|
@ -66,5 +70,12 @@
|
||||||
UserData user = report.UserReporter;
|
UserData user = report.UserReporter;
|
||||||
user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds();
|
user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds();
|
||||||
await UsersRepository.updateUserAsync(user);
|
await UsersRepository.updateUserAsync(user);
|
||||||
|
await removeReport();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task removeReport()
|
||||||
|
{
|
||||||
|
await ReportsRepository.deleteReportAsync(report.ReportID);
|
||||||
|
navigationManager.NavigateTo("/sys/reports", true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 138 KiB |
Loading…
Reference in a new issue