feat(export): add open-chat window from session list

This commit is contained in:
tisonhuang
2026-03-04 18:29:41 +08:00
parent cf7190aaec
commit 926ca72331
7 changed files with 205 additions and 38 deletions

View File

@@ -4047,7 +4047,7 @@ function ExportPage() {
<>
<div className="contacts-list-header">
<span className="contacts-list-header-main">//</span>
<span className="contacts-list-header-count"></span>
<span className="contacts-list-header-count"></span>
<span className="contacts-list-header-actions"></span>
</div>
<div className="contacts-list" ref={contactsListRef} onScroll={onContactsListScroll}>
@@ -4091,16 +4091,25 @@ function ExportPage() {
</div>
<div className="row-message-count">
<div className="row-message-stats">
<span className="row-message-stat total">
<span className="label"></span>
<strong className={`row-message-count-value ${typeof displayedMessageCount === 'number' ? '' : 'muted'}`}>
{messageCountLabel}
</strong>
</span>
<strong className={`row-message-count-value ${typeof displayedMessageCount === 'number' ? '' : 'muted'}`}>
{messageCountLabel}
</strong>
</div>
</div>
<div className="row-action-cell">
<div className="row-action-main">
<button
className="row-open-chat-btn"
disabled={!canExport}
title={canExport ? '在新窗口打开该会话' : '该联系人暂无会话记录'}
onClick={() => {
if (!canExport) return
void window.electronAPI.window.openSessionChatWindow(contact.username)
}}
>
<ExternalLink size={13} />
</button>
<button
className={`row-detail-btn ${showSessionDetailPanel && sessionDetail?.wxid === contact.username ? 'active' : ''}`}
onClick={() => openSessionDetail(contact.username)}