finished implementing thread view, finished adding comments

This commit is contained in:
limited_dev 2023-01-26 13:04:55 +01:00
parent f09722757a
commit 3e7218c6ae
12 changed files with 87 additions and 34 deletions

View file

@ -1,9 +1,23 @@
@page "/"
@using ImageBoardServerApp.Data.Repository
<h1>BulletBoard</h1>
<div>
This is a simple Imageboard made in Razor.
</div>
<div>
</div>
<span>This is a simple Imageboard made in Razor.</span>
<br/>
<span>We're currently hosting @amountOfPosts Threads with @amountOfComments Comments from @amountOfUsers Users.</span>
@code{
private int amountOfPosts = -1;
private int amountOfComments = -1;
private int amountOfUsers = -1;
protected override async Task OnInitializedAsync()
{
var posts = await PostsRepository.getPostsAsync();
amountOfPosts = posts.Count;
var comments = await CommentsRepository.getCommentsAsync();
amountOfComments = comments.Count;
var users = await UsersRepository.getUsersAsync();
amountOfUsers = users.Count;
}
}