diff --git a/src/pages/ExportPage.tsx b/src/pages/ExportPage.tsx index b87c021..10a11c0 100644 --- a/src/pages/ExportPage.tsx +++ b/src/pages/ExportPage.tsx @@ -1905,6 +1905,14 @@ function ExportPage() { .sort((a, b) => (a.displayName || a.username).localeCompare(b.displayName || b.username, 'zh-Hans-CN')) }, [contactsList, activeTab, searchKeyword]) + const sessionRowByUsername = useMemo(() => { + const map = new Map() + for (const session of sessions) { + map.set(session.username, session) + } + return map + }, [sessions]) + const contactsUpdatedAtLabel = useMemo(() => { if (!contactsUpdatedAt) return '' return new Date(contactsUpdatedAt).toLocaleString() @@ -2407,6 +2415,11 @@ function ExportPage() { {visibleContacts.map((contact, idx) => { const absoluteIndex = contactStartIndex + idx const top = absoluteIndex * CONTACTS_LIST_VIRTUAL_ROW_HEIGHT + const matchedSession = sessionRowByUsername.get(contact.username) + const canExport = Boolean(matchedSession?.hasSession) + const isRunning = canExport && runningSessionIds.has(contact.username) + const isQueued = canExport && queuedSessionIds.has(contact.username) + const recent = canExport ? formatRecentExportTime(lastExportBySession[contact.username], nowTick) : '' return (
{getContactTypeName(contact.type)}
+
+ + {recent && {recent}} +
)