mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
feat(export): move open-chat action below message count
This commit is contained in:
@@ -1347,8 +1347,10 @@
|
|||||||
width: var(--contacts-message-col-width);
|
width: var(--contacts-message-col-width);
|
||||||
min-width: var(--contacts-message-col-width);
|
min-width: var(--contacts-message-col-width);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
gap: 4px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -1397,6 +1399,30 @@
|
|||||||
.row-message-stat.total .row-message-count-value {
|
.row-message-stat.total .row-message-count-value {
|
||||||
font-size: 13px;
|
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 {
|
.table-virtuoso {
|
||||||
@@ -1546,33 +1572,6 @@
|
|||||||
gap: 6px;
|
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 {
|
.row-detail-btn {
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -2704,6 +2703,10 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-wrap .row-open-chat-link {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
.export-dialog-overlay {
|
.export-dialog-overlay {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3825,6 +3825,11 @@ function ExportPage() {
|
|||||||
: typeof displayedMessageCount === 'number'
|
: typeof displayedMessageCount === 'number'
|
||||||
? displayedMessageCount.toLocaleString('zh-CN')
|
? displayedMessageCount.toLocaleString('zh-CN')
|
||||||
: '获取中'
|
: '获取中'
|
||||||
|
const openChatLabel = contact.type === 'friend'
|
||||||
|
? '打开私聊'
|
||||||
|
: contact.type === 'group'
|
||||||
|
? '打开群聊'
|
||||||
|
: '打开对话'
|
||||||
return (
|
return (
|
||||||
<div className={`contact-row ${checked ? 'selected' : ''}`}>
|
<div className={`contact-row ${checked ? 'selected' : ''}`}>
|
||||||
<div className="contact-item">
|
<div className="contact-item">
|
||||||
@@ -3856,21 +3861,21 @@ function ExportPage() {
|
|||||||
{messageCountLabel}
|
{messageCountLabel}
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{canExport && (
|
||||||
<div className="row-action-cell">
|
|
||||||
<div className="row-action-main">
|
|
||||||
<button
|
<button
|
||||||
className="row-open-chat-btn"
|
type="button"
|
||||||
disabled={!canExport}
|
className="row-open-chat-link"
|
||||||
title={canExport ? '在新窗口打开该会话' : '该联系人暂无会话记录'}
|
title="在新窗口打开该会话"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!canExport) return
|
|
||||||
void window.electronAPI.window.openSessionChatWindow(contact.username, { source: 'export' })
|
void window.electronAPI.window.openSessionChatWindow(contact.username, { source: 'export' })
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ExternalLink size={13} />
|
{openChatLabel}
|
||||||
打开对话
|
|
||||||
</button>
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="row-action-cell">
|
||||||
|
<div className="row-action-main">
|
||||||
<button
|
<button
|
||||||
className={`row-detail-btn ${showSessionDetailPanel && sessionDetail?.wxid === contact.username ? 'active' : ''}`}
|
className={`row-detail-btn ${showSessionDetailPanel && sessionDetail?.wxid === contact.username ? 'active' : ''}`}
|
||||||
onClick={() => openSessionDetail(contact.username)}
|
onClick={() => openSessionDetail(contact.username)}
|
||||||
|
|||||||
Reference in New Issue
Block a user