finished implementing thread view, finished adding comments
This commit is contained in:
parent
f09722757a
commit
3e7218c6ae
12 changed files with 87 additions and 34 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue