fix: fixed minor issues

This commit is contained in:
limited_dev 2023-02-17 22:54:13 +01:00
parent 6a1287495d
commit d8fcc93394
5 changed files with 18 additions and 2 deletions

View file

@ -12,7 +12,9 @@
<Comment comment="comment"/>
<hr/>
}
<div class="Form">
<CommentForm post="post"/>
</div>
@code {
[Parameter]

View file

@ -0,0 +1,3 @@
.Form{
text-align: center;
}

View file

@ -39,7 +39,7 @@ using (var serviceScope = app.Services.CreateScope())
context.Database.EnsureCreated();
}
ImageThumbnailOptions options = new ImageThumbnailOptions("wwwroot/img/", "wwwroot/img/thumb");
ImageThumbnailOptions options = new ImageThumbnailOptions("wwwroot/img/", "thumb");
options.ImageQuality = 75L;
app.UseImageThumbnail(options);

View file

@ -1,5 +1,6 @@
@using System.ComponentModel.DataAnnotations
@using ImageBoardServerApp.Data.Repository
@inject NavigationManager navigationManager
<div>
@if (report.Type == "op")
{
@ -38,6 +39,8 @@
<span> </span>
<a @onclick="() => banReporter(99999999)" href="javascript:void(0)">99M Tage</a>
<br/>
<a @onclick="@removeReport" href="javascript:void(0)" >Done</a>
<br/>
@if (report.Type == "op")
{
<Post post="report.ReportedPost" showOpenThread="true"></Post>
@ -59,6 +62,7 @@
UserData user = report.UserReported;
user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds();
await UsersRepository.updateUserAsync(user);
await removeReport();
}
private async Task banReporter(int days)
@ -66,5 +70,12 @@
UserData user = report.UserReporter;
user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds();
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