From 7bf9e370369df05abc13e2ac0ad440b7989aae69 Mon Sep 17 00:00:00 2001
From: lezi-fun <177434121+lezi-fun@users.noreply.github.com>
Date: Tue, 11 Aug 2026 21:08:55 +0800
Subject: [PATCH] fix: reply button always visible (mail-style icon), works on
own replies
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Reply button: always visible (opacity 0.5), only icon (no text),
hover → full opacity + primary color
- Works on own replies (no restriction on replying to self)
- Removed .reply-item:hover .reply-btn (was requiring parent hover)
---
app/globals.css | 25 ++++++++++++++++++-------
components/ReplyList.js | 4 ++--
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/app/globals.css b/app/globals.css
index 03aa06a..12f29b4 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -3074,16 +3074,27 @@ a.btn-secondary {
}
}
-/* ===== 回复操作按钮:悬停显示 ===== */
+/* ===== 回复操作按钮(邮件回复风格) ===== */
.reply-btn {
- opacity: 0;
- transition: opacity 0.15s ease;
+ background: none;
+ border: none;
+ cursor: pointer;
+ padding: 4px 6px;
+ border-radius: 4px;
+ color: var(--text-light);
+ opacity: 0.5;
+ transition: opacity 0.15s, background 0.15s, color 0.15s;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ margin-left: 4px;
}
-.reply-item:hover .reply-btn,
-.reply-item:focus-within .reply-btn {
+.reply-btn:hover {
opacity: 1;
+ background: var(--glass-bg);
+ color: var(--primary);
}
-/* 触屏设备(无 hover):始终显示 */
+/* 触屏设备:始终全透明 */
@media (hover: none) {
- .reply-btn { opacity: 1; }
+ .reply-btn { opacity: 0.8; }
}
diff --git a/components/ReplyList.js b/components/ReplyList.js
index 682e47b..e91a2bb 100644
--- a/components/ReplyList.js
+++ b/components/ReplyList.js
@@ -99,8 +99,8 @@ export default function ReplyList({ postId, onRefresh }) {
{r.username || '匿名用户'}
{rTime}
-