feat(export): show session avatar in detail header

This commit is contained in:
tisonhuang
2026-03-02 14:10:32 +08:00
parent 21a97b8871
commit e9fd751578
2 changed files with 66 additions and 6 deletions

View File

@@ -1044,11 +1044,59 @@
padding: 14px;
border-bottom: 1px solid var(--border-color);
.detail-header-main {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.detail-header-avatar {
width: 32px;
height: 32px;
border-radius: 8px;
background: linear-gradient(135deg, var(--primary), var(--primary-hover));
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
flex-shrink: 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
span {
color: #fff;
font-size: 13px;
font-weight: 600;
}
}
.detail-header-meta {
min-width: 0;
h4 {
margin: 0;
font-size: 15px;
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.detail-header-id {
margin-top: 3px;
font-size: 11px;
color: var(--text-tertiary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.close-btn {

View File

@@ -2721,7 +2721,19 @@ function ExportPage() {
onClick={(event) => event.stopPropagation()}
>
<div className="detail-header">
<h4></h4>
<div className="detail-header-main">
<div className="detail-header-avatar">
{sessionDetail?.avatarUrl ? (
<img src={sessionDetail.avatarUrl} alt="" />
) : (
<span>{getAvatarLetter(sessionDetail?.displayName || sessionDetail?.wxid || '')}</span>
)}
</div>
<div className="detail-header-meta">
<h4>{sessionDetail?.displayName || '会话详情'}</h4>
<div className="detail-header-id">{sessionDetail?.wxid || ''}</div>
</div>
</div>
<button className="close-btn" onClick={() => setShowSessionDetailPanel(false)}>
<X size={16} />
</button>