feat(export): move open-chat action below message count

This commit is contained in:
aits2026
2026-03-05 16:18:00 +08:00
parent a5358b82f6
commit b3dd0e25fa
2 changed files with 44 additions and 36 deletions

View File

@@ -1347,8 +1347,10 @@
width: var(--contacts-message-col-width);
min-width: var(--contacts-message-col-width);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
flex-shrink: 0;
text-align: center;
}
@@ -1397,6 +1399,30 @@
.row-message-stat.total .row-message-count-value {
font-size: 13px;
}
.row-open-chat-link {
border: none;
padding: 0;
margin: 0;
background: transparent;
color: var(--primary);
font-size: 12px;
line-height: 1.2;
font-weight: 600;
cursor: pointer;
&:hover {
color: var(--primary-hover);
text-decoration: underline;
text-underline-offset: 2px;
}
&:focus-visible {
outline: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
outline-offset: 2px;
border-radius: 4px;
}
}
}
.table-virtuoso {
@@ -1546,33 +1572,6 @@
gap: 6px;
}
.row-open-chat-btn {
border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--border-color));
border-radius: 8px;
padding: 7px 10px;
background: color-mix(in srgb, var(--primary) 12%, var(--bg-secondary));
color: var(--primary);
font-size: 12px;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 5px;
white-space: nowrap;
&:hover:not(:disabled) {
background: color-mix(in srgb, var(--primary) 18%, var(--bg-secondary));
border-color: color-mix(in srgb, var(--primary) 55%, var(--border-color));
}
&:disabled {
opacity: 0.65;
cursor: not-allowed;
color: var(--text-tertiary);
border-color: var(--border-color);
background: var(--bg-secondary);
}
}
.row-detail-btn {
border: 1px solid var(--border-color);
border-radius: 8px;
@@ -2704,6 +2703,10 @@
font-size: 12px;
}
.table-wrap .row-open-chat-link {
font-size: 11px;
}
.export-dialog-overlay {
padding: 10px;
}

View File

@@ -3825,6 +3825,11 @@ function ExportPage() {
: typeof displayedMessageCount === 'number'
? displayedMessageCount.toLocaleString('zh-CN')
: '获取中'
const openChatLabel = contact.type === 'friend'
? '打开私聊'
: contact.type === 'group'
? '打开群聊'
: '打开对话'
return (
<div className={`contact-row ${checked ? 'selected' : ''}`}>
<div className="contact-item">
@@ -3856,21 +3861,21 @@ function ExportPage() {
{messageCountLabel}
</strong>
</div>
</div>
<div className="row-action-cell">
<div className="row-action-main">
{canExport && (
<button
className="row-open-chat-btn"
disabled={!canExport}
title={canExport ? '在新窗口打开该会话' : '该联系人暂无会话记录'}
type="button"
className="row-open-chat-link"
title="在新窗口打开该会话"
onClick={() => {
if (!canExport) return
void window.electronAPI.window.openSessionChatWindow(contact.username, { source: 'export' })
}}
>
<ExternalLink size={13} />
{openChatLabel}
</button>
)}
</div>
<div className="row-action-cell">
<div className="row-action-main">
<button
className={`row-detail-btn ${showSessionDetailPanel && sessionDetail?.wxid === contact.username ? 'active' : ''}`}
onClick={() => openSessionDetail(contact.username)}