!INFO: tried to move to postgreSQL did not work
fix: fixed bumping, fixed banning from Reports Menu feat: improved homepage, finilized comments and posts, moved version from nav menu to sidebar Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
7bd31ea7b5
commit
73be698399
12 changed files with 188 additions and 47 deletions
|
@ -1,8 +1,9 @@
|
|||
@page "/"
|
||||
@using ImageBoardServerApp.Util
|
||||
@using ImageBoardServerApp.Data.Repository
|
||||
@inject AuthenticationStateProvider authStateProvider
|
||||
|
||||
<h1>BulletBoard</h1>
|
||||
<h1>BulletBoard @ver</h1>
|
||||
<p>
|
||||
This is a simple <a href="https://en.wiktionary.org/wiki/imageboard">imageboard</a> made in <a href="https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor">Razor Server</a>.
|
||||
<br/>
|
||||
|
@ -12,7 +13,9 @@
|
|||
<br/>
|
||||
Click <a href="https://www.gnu.org/philosophy/free-sw.en.html">here</a> to learn more about free software.
|
||||
<br/>
|
||||
Check out the project on <a href="https://git.limited-dev.de/eric/imageboard">Gitlab</a>.
|
||||
<br>
|
||||
<br/>
|
||||
We're currently @amountOfUsers User(s), viewing @amountOfPosts Post(s) with @amountOfComments Comment(s).
|
||||
<br/>
|
||||
Click here to:
|
||||
|
@ -36,6 +39,8 @@
|
|||
private int amountOfComments = -1;
|
||||
private int amountOfUsers = -1;
|
||||
|
||||
public string ver { get; set; } = TheManager.version;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
var posts = await PostsRepository.getPostsAsync();
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
{
|
||||
if (selectedItem == null || selectedItem == "none")
|
||||
return;
|
||||
if (explaination == null)
|
||||
return;
|
||||
var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider;
|
||||
var user = await cauthStateProvder.GetAuthenticationStateAsync();
|
||||
var usr = user.User;
|
||||
|
@ -94,10 +96,13 @@
|
|||
};
|
||||
|
||||
List<ReportData> submittedReports = foundusr.RecivedReports;
|
||||
foreach (var r in submittedReports)
|
||||
if (foundusr.RecivedReports != null)
|
||||
{
|
||||
if (r.ReportedPostID == reportData.ReportedPostID && r.ReportedCommentID == reportData.ReportedCommentID)
|
||||
return;
|
||||
foreach (var r in submittedReports)
|
||||
{
|
||||
if (r.ReportedPostID == reportData.ReportedPostID && r.ReportedCommentID == reportData.ReportedCommentID)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await ReportsRepository.createReportAsync(reportData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue