Add locked thread guards

This commit is contained in:
Dominic Ferrando
2025-04-24 20:44:48 -04:00
parent f9aad52dc5
commit f8a8bf5b1b
3 changed files with 24 additions and 10 deletions
+3 -1
View File
@@ -216,7 +216,9 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post
<script src="/static/thread.js" defer></script>
@BoardHeader(board)
<div class="new-post-container">
@shared.NewPostForm(board, fmt.Sprintf("/%s/threads/%d", board.Slug, thread.Id), false)
if !thread.Locked {
@shared.NewPostForm(board, fmt.Sprintf("/%s/threads/%d", board.Slug, thread.Id), false)
}
</div>
@ThreadActionBar(thread, "top")
<div