From 45ace3ba75e2fdf3fa335aab8dcce5b230add6b0 Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Tue, 11 Aug 2026 22:26:02 +0800 Subject: [PATCH] cleanup: remove chain view + show-more, all replies always visible --- app/globals.css | 22 ---------------------- components/ReplyList.js | 16 +--------------- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/app/globals.css b/app/globals.css index 13e0002..ab13287 100644 --- a/app/globals.css +++ b/app/globals.css @@ -3144,25 +3144,3 @@ a.btn-secondary { flex-wrap: wrap; } } - -/* ===== 继续此消息串(Discourse 风格折叠) ===== */ -.reply-show-more { - display: flex; - align-items: center; - gap: 6px; - margin: 12px 0 4px; - padding: 8px 16px; - background: var(--glass-bg); - border: 1px solid var(--glass-border); - border-radius: var(--radius-sm); - color: var(--primary); - font-size: 13px; - font-weight: 500; - cursor: pointer; - transition: all 0.15s; -} -.reply-show-more:hover { - background: var(--primary); - color: #fff; - border-color: var(--primary); -} diff --git a/components/ReplyList.js b/components/ReplyList.js index 6b5a704..cfe14a7 100644 --- a/components/ReplyList.js +++ b/components/ReplyList.js @@ -94,15 +94,6 @@ export default function ReplyList({ postId, onRefresh }) { // 正在回复的目标回复对象(用于显示 @用户名) const replyToObj = replyTo ? replies.find((x) => x.id === replyTo) : null; - // 回复折叠:根据视口高度动态调整可见条数(至少 3 条) - const [showCount, setShowCount] = useState(3); - const [showAllReplies, setShowAllReplies] = useState(false); - useEffect(() => { - setShowCount(Math.max(3, Math.floor(window.innerHeight / 200))); - }, []); - const visibleReplies = showAllReplies ? replies : replies.slice(-showCount); - const hiddenCount = replies.length - visibleReplies.length; - return ( <>