Skip to content

Commit 9a144d4

Browse files
committed
docs: add 'pin comments'
1 parent b6dbd0c commit 9a144d4

File tree

6 files changed

+29
-0
lines changed

6 files changed

+29
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: 'Pin comments'
3+
---
4+
5+
# Pin comments
6+
7+
The pin comments feature allows moderators to highlight important comments by displaying them at the top of the comment list.
8+
9+
10+
## Pin option in the dropdown menu
11+
12+
To pin a comment:
13+
14+
1. Log in as a moderator
15+
2. Click the dropdown menu of a comment
16+
3. Select the `Pin` option.
17+
18+
![Pin option in the dropdown menu](/images/docs/features/pin-comments/pin-in-menu.png)
19+
20+
## Pinned comments
21+
22+
Pinned comments are displayed at the top of the list.
23+
24+
![Pinned comments](/images/docs/features/pin-comments/pinned-comment.png)
25+
26+
Pinned comments are sorted by the pinned time. The latest pinned comment will be displayed at the top of the list.
27+
![Pinned replies](/images/docs/features/pin-comments/pinned-reply.png)

apps/main/posts/docs/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"features/analytics.mdx",
1111
"features/anti-toxic-comment.mdx",
1212
"features/moderate.mdx",
13+
"features/pin-comments.mdx",
1314
"API/webhook.mdx",
1415
"self-hosted.mdx",
1516
"system-maintenance.mdx"
119 KB
Loading
117 KB
Loading
256 KB
Loading

apps/main/src/pages/play.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const getStaticProps: GetStaticProps<StaticProps> = async (): Promise<
1515

1616
const result = await prisma.comment.deleteMany({
1717
where: {
18+
pinnedAt: null,
1819
createdAt: {
1920
lt: beforeDate,
2021
},

0 commit comments

Comments
 (0)