fix: 笔记列表 hover 操作按钮与日期互换显示

This commit is contained in:
MikiVL 2026-05-05 03:45:05 +08:00
parent 8ce1072b0c
commit 2ade39d58f

View File

@ -582,8 +582,9 @@ function DraggableNoteItem({ note, active, editing, editValue, editRef, activeTa
</span> </span>
)} )}
</div> </div>
{hovered ? (
<div className="flex items-center gap-0.5 shrink-0"> <div className="flex items-center gap-0.5 shrink-0">
{hovered ? (
<>
<button <button
className="toolbar-btn" className="toolbar-btn"
style={{ width: 20, height: 20, color: note.starred ? '#f59e0b' : 'var(--text-faint)' }} style={{ width: 20, height: 20, color: note.starred ? '#f59e0b' : 'var(--text-faint)' }}
@ -602,13 +603,14 @@ function DraggableNoteItem({ note, active, editing, editValue, editRef, activeTa
> >
<Trash2 size={12} /> <Trash2 size={12} />
</button> </button>
</div> </>
) : ( ) : (
<span className="text-xs shrink-0 mt-0.5" style={{ color: 'var(--text-faint)' }}> <span className="text-xs" style={{ color: 'var(--text-faint)' }}>
{formatDate(note.updatedAt)} {formatDate(note.updatedAt)}
</span> </span>
)} )}
</div> </div>
</div>
{note.tags.length > 0 && ( {note.tags.length > 0 && (
<div className="flex gap-1 mt-1 flex-wrap"> <div className="flex gap-1 mt-1 flex-wrap">
{note.tags.slice(0, 3).map(tag => ( {note.tags.slice(0, 3).map(tag => (