fix: reply button always visible (mail-style icon), works on own replies
- 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)
This commit is contained in:
1 parent
2bb1f4227e
commit
7bf9e37036
2 files changed
+20
-9
No files matched your search
+18
-7
@@ -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; }
|
||||
}
|
||||
@@ -99,8 +99,8 @@ export default function ReplyList({ postId, onRefresh }) {
|
||||
{r.username || '匿名用户'}
|
||||
</span>
|
||||
<span className="reply-time">{rTime}</span>
|
||||
<button className="btn-sm btn-secondary reply-btn" onClick={() => startReply(r.username)}>
|
||||
<Icon name="reply" size={12} /> 回复
|
||||
<button className="reply-btn" onClick={() => startReply(r.username)} title="回复">
|
||||
<Icon name="reply" size={13} />
|
||||
</button>
|
||||
{currentUser && (currentUser.id === r.user_id || currentUser.role === 'admin') && (
|
||||
<button className="btn-sm btn-danger reply-delete-btn" onClick={() => handleDelete(r.id)}>
|
||||
|
||||
Reference in new issue
Block a user