29 lines
710 B
Text
29 lines
710 B
Text
|
@page "/sys/modmenu/boards/edit/{Tag}"
|
||
|
@using ImageBoardServerApp.Data.Repository
|
||
|
<AuthorizeView Roles="Admin">
|
||
|
<Authorized>
|
||
|
<BoardForm Tag="@b.Tag" Topic="@b.Topic" maxThread="@mxThr" lockBoard="@b.isLocked"/>
|
||
|
</Authorized>
|
||
|
<NotAuthorized>
|
||
|
<DeadLink/>
|
||
|
</NotAuthorized>
|
||
|
</AuthorizeView>
|
||
|
|
||
|
@code {
|
||
|
[Parameter]
|
||
|
public string Tag { get; set; }
|
||
|
|
||
|
public string mxThr { get; set; }
|
||
|
|
||
|
public BoardData b { get; set; }
|
||
|
|
||
|
protected override async Task OnParametersSetAsync()
|
||
|
{
|
||
|
await base.OnParametersSetAsync();
|
||
|
b = await BoardsRepository.getBoardByTagAsync(Tag);
|
||
|
if (b == null)
|
||
|
return;
|
||
|
mxThr = b.maxThreads + "";
|
||
|
}
|
||
|
|
||
|
}
|