feat: Discourse-style reply-to indicator (↩ @username)

- replies table: add reply_to_username column
- POST /api/replies: accept reply_to_username param
- GET /api/replies: LEFT JOIN users to return reply_to_username
- ReplyList: submit replyTo as reply_to_username on create
- UI: each reply shows '↩ 正在回复 @username' indicator (clickable,
  scrolls to target reply)
- data-username attribute on .reply-item for scroll targeting
This commit is contained in:
lezi-fun committed 2026-08-11 21:18:18 +08:00
1 parent 7bf9e37036
commit 4d0d5edec3
5 files changed
+56 -20

No files matched your search

+22
View File
@@ -3098,3 +3098,25 @@ a.btn-secondary {
@media (hover: none) {
.reply-btn { opacity: 0.8; }
}
/* ===== 回复指示器(Discourse 风格:正在回复 @xxx) ===== */
.reply-to-indicator {
display: inline-flex;
align-items: center;
gap: 4px;
margin-top: 4px;
font-size: 12px;
color: var(--text-light);
cursor: pointer;
transition: color 0.15s;
}
.reply-to-indicator .icon {
stroke: var(--text-light);
}
.reply-to-indicator:hover {
color: var(--primary);
}
.reply-to-indicator strong {
color: var(--primary);
font-weight: 600;
}