2023-01-18 12:56:24 +00:00
|
|
|
@using System.ComponentModel.DataAnnotations
|
|
|
|
@using ImageBoardServerApp.Data
|
|
|
|
@using ImageBoardServerApp.Data.Repository
|
|
|
|
|
2023-02-13 21:04:09 +00:00
|
|
|
<img class="banner" src="img/static/banner/@board.Tag ban.png" alt="No Banner found"/>
|
2023-01-18 12:56:24 +00:00
|
|
|
<PageTitle>/@board.Tag/ - @board.Topic - BulletBoard</PageTitle>
|
|
|
|
|
2023-02-13 17:45:14 +00:00
|
|
|
<AuthorizeView>
|
|
|
|
<Authorized>
|
|
|
|
<div class="boardHeader">
|
|
|
|
<h3>@board.Topic Board</h3>
|
|
|
|
<PostForm board="@board"/>
|
|
|
|
<PageFooter/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Threads</h3>
|
|
|
|
<br/>
|
|
|
|
@if (posts != null)
|
2023-02-12 16:01:46 +00:00
|
|
|
{
|
2023-02-13 17:45:14 +00:00
|
|
|
@if (posts.Any())
|
|
|
|
{
|
|
|
|
@foreach(var post in posts)
|
|
|
|
{
|
|
|
|
<Post post="@post" showOpenThread="true"></Post>
|
|
|
|
<hr/>
|
|
|
|
}
|
|
|
|
}
|
2023-02-12 16:01:46 +00:00
|
|
|
}
|
2023-02-13 17:45:14 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
<p>
|
|
|
|
<em>Loading Posts...</em>
|
|
|
|
</p>
|
|
|
|
}
|
|
|
|
</Authorized>
|
|
|
|
<NotAuthorized>
|
|
|
|
<div class="notLoggedIn">
|
|
|
|
<span>You are not logged in.</span>
|
|
|
|
<a class="navbar-brand" href="/sys/login">Please login first.</a>
|
|
|
|
</div>
|
|
|
|
</NotAuthorized>
|
|
|
|
</AuthorizeView>
|
2023-01-18 13:49:53 +00:00
|
|
|
|
2023-01-18 12:56:24 +00:00
|
|
|
@code {
|
|
|
|
|
|
|
|
private List<PostData> posts;
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
{
|
2023-02-13 17:45:14 +00:00
|
|
|
posts = await TheManager.getPostList(board.Tag);
|
2023-01-18 12:56:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
[Required]
|
|
|
|
public BoardData board { get; set; }
|
|
|
|
}
|