2023-01-18 12:56:24 +00:00
|
|
|
@page "/"
|
2023-01-26 12:04:55 +00:00
|
|
|
@using ImageBoardServerApp.Data.Repository
|
2023-02-02 07:15:43 +00:00
|
|
|
@inject AuthenticationStateProvider authStateProvider
|
2023-01-18 12:56:24 +00:00
|
|
|
|
|
|
|
<h1>BulletBoard</h1>
|
2023-01-26 12:04:55 +00:00
|
|
|
<span>This is a simple Imageboard made in Razor.</span>
|
|
|
|
<br/>
|
2023-02-07 20:21:38 +00:00
|
|
|
<span>We're currently hosting @amountOfPosts Threads, @amountOfComments Comments and @amountOfUsers Users.</span>
|
2023-02-24 23:08:36 +00:00
|
|
|
<br/>
|
2023-02-02 07:15:43 +00:00
|
|
|
<span>@Details</span>
|
2023-02-12 18:06:33 +00:00
|
|
|
<AuthorizeView>
|
|
|
|
<Authorized>
|
|
|
|
<br/>
|
|
|
|
<a href="/sys/you">Edit your account</a>
|
|
|
|
</Authorized>
|
|
|
|
</AuthorizeView>
|
2023-01-26 12:04:55 +00:00
|
|
|
|
|
|
|
@code{
|
2023-02-02 07:15:43 +00:00
|
|
|
private string Details { get; set; }
|
2023-06-12 16:51:25 +00:00
|
|
|
|
2023-01-26 12:04:55 +00:00
|
|
|
private int amountOfPosts = -1;
|
|
|
|
private int amountOfComments = -1;
|
|
|
|
private int amountOfUsers = -1;
|
2023-06-12 16:51:25 +00:00
|
|
|
|
|
|
|
protected override async Task OnParametersSetAsync()
|
2023-01-26 12:04:55 +00:00
|
|
|
{
|
|
|
|
var posts = await PostsRepository.getPostsAsync();
|
|
|
|
amountOfPosts = posts.Count;
|
|
|
|
var comments = await CommentsRepository.getCommentsAsync();
|
|
|
|
amountOfComments = comments.Count;
|
|
|
|
var users = await UsersRepository.getUsersAsync();
|
|
|
|
amountOfUsers = users.Count;
|
2023-06-12 16:51:25 +00:00
|
|
|
await base.OnParametersSetAsync();
|
2023-01-26 12:04:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|