mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 15:25:50 +00:00
fix(export): hide recent-export row when no history
This commit is contained in:
@@ -1877,20 +1877,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-export-meta {
|
|
||||||
display: inline-flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
gap: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row-export-meta-label {
|
|
||||||
font-size: 10px;
|
|
||||||
line-height: 1.2;
|
|
||||||
color: var(--text-tertiary);
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row-export-time {
|
.row-export-time {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@@ -1900,7 +1886,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-export-link.state-running + .row-export-meta .row-export-time {
|
.row-export-link.state-running + .row-export-time {
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
@@ -1911,11 +1897,6 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-export-link.state-disabled + .row-export-meta .row-export-meta-label,
|
|
||||||
.row-export-link.state-disabled + .row-export-meta .row-export-time {
|
|
||||||
color: var(--text-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.row-export-link.state-disabled:hover:not(:disabled),
|
.row-export-link.state-disabled:hover:not(:disabled),
|
||||||
.row-export-link.state-disabled:focus-visible {
|
.row-export-link.state-disabled:focus-visible {
|
||||||
color: var(--text-tertiary);
|
color: var(--text-tertiary);
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ const formatPathBrief = (value: string, maxLength = 52): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const formatRecentExportTime = (timestamp?: number, now = Date.now()): string => {
|
const formatRecentExportTime = (timestamp?: number, now = Date.now()): string => {
|
||||||
if (!timestamp) return '未导出'
|
if (!timestamp) return ''
|
||||||
const diff = Math.max(0, now - timestamp)
|
const diff = Math.max(0, now - timestamp)
|
||||||
const minute = 60 * 1000
|
const minute = 60 * 1000
|
||||||
const hour = 60 * minute
|
const hour = 60 * minute
|
||||||
@@ -5067,7 +5067,9 @@ function ExportPage() {
|
|||||||
const checked = canExport && selectedSessions.has(contact.username)
|
const checked = canExport && selectedSessions.has(contact.username)
|
||||||
const isRunning = canExport && runningSessionIds.has(contact.username)
|
const isRunning = canExport && runningSessionIds.has(contact.username)
|
||||||
const isQueued = canExport && queuedSessionIds.has(contact.username)
|
const isQueued = canExport && queuedSessionIds.has(contact.username)
|
||||||
const recentExportTime = canExport ? formatRecentExportTime(lastExportBySession[contact.username], nowTick) : '—'
|
const recentExportTimestamp = lastExportBySession[contact.username]
|
||||||
|
const hasRecentExport = canExport && Boolean(recentExportTimestamp)
|
||||||
|
const recentExportTime = hasRecentExport ? formatRecentExportTime(recentExportTimestamp, nowTick) : ''
|
||||||
const countedMessages = normalizeMessageCount(sessionMessageCounts[contact.username])
|
const countedMessages = normalizeMessageCount(sessionMessageCounts[contact.username])
|
||||||
const hintedMessages = normalizeMessageCount(matchedSession?.messageCountHint)
|
const hintedMessages = normalizeMessageCount(matchedSession?.messageCountHint)
|
||||||
const displayedMessageCount = countedMessages ?? hintedMessages
|
const displayedMessageCount = countedMessages ?? hintedMessages
|
||||||
@@ -5229,12 +5231,7 @@ function ExportPage() {
|
|||||||
>
|
>
|
||||||
{!canExport ? '暂无会话' : isRunning ? '导出中...' : isQueued ? '排队中' : '单会话导出'}
|
{!canExport ? '暂无会话' : isRunning ? '导出中...' : isQueued ? '排队中' : '单会话导出'}
|
||||||
</button>
|
</button>
|
||||||
{canExport && (
|
{hasRecentExport && <span className="row-export-time">{recentExportTime}</span>}
|
||||||
<div className="row-export-meta">
|
|
||||||
<span className="row-export-meta-label">最近导出</span>
|
|
||||||
<span className="row-export-time">{recentExportTime}</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user