refactor(export): remove scroll back-to-top affordance

This commit is contained in:
tisonhuang
2026-03-05 13:31:13 +08:00
parent 02a6b24517
commit 7e7503035a
2 changed files with 0 additions and 56 deletions

View File

@@ -1400,28 +1400,6 @@
}
}
.back-to-top-btn {
position: fixed;
top: 14px;
right: 18px;
z-index: 120;
border: 1px solid rgba(var(--primary-rgb), 0.4);
border-radius: 999px;
background: color-mix(in srgb, var(--bg-primary) 90%, var(--bg-secondary));
color: var(--primary);
font-size: 12px;
font-weight: 600;
padding: 6px 12px;
cursor: pointer;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
transition: transform 0.12s ease, box-shadow 0.12s ease;
&:hover {
transform: translateY(-1px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}
}
.table-virtuoso {
height: 100%;
}
@@ -2769,9 +2747,4 @@
.export-session-detail-panel {
width: calc(100vw - 12px);
}
.back-to-top-btn {
top: 10px;
right: 10px;
}
}

View File

@@ -1275,7 +1275,6 @@ function ExportPage() {
const [hasSeededSnsStats, setHasSeededSnsStats] = useState(false)
const [nowTick, setNowTick] = useState(Date.now())
const [isContactsListAtTop, setIsContactsListAtTop] = useState(true)
const [isPageScrolled, setIsPageScrolled] = useState(false)
const tabCounts = useContactTypeCountsStore(state => state.tabCounts)
const isSharedTabCountsLoading = useContactTypeCountsStore(state => state.isLoading)
const isSharedTabCountsReady = useContactTypeCountsStore(state => state.isReady)
@@ -1596,19 +1595,6 @@ function ExportPage() {
return () => clearInterval(timer)
}, [isExportRoute])
useEffect(() => {
if (!isExportRoute) {
setIsPageScrolled(false)
return
}
const onWindowScroll = () => {
setIsPageScrolled(window.scrollY > 160)
}
onWindowScroll()
window.addEventListener('scroll', onWindowScroll, { passive: true })
return () => window.removeEventListener('scroll', onWindowScroll)
}, [isExportRoute])
useEffect(() => {
if (!isTaskCenterOpen || !expandedPerfTaskId) return
const target = tasks.find(task => task.id === expandedPerfTaskId)
@@ -3810,7 +3796,6 @@ function ExportPage() {
const taskRunningCount = tasks.filter(task => task.status === 'running').length
const taskQueuedCount = tasks.filter(task => task.status === 'queued').length
const hasFilteredContacts = filteredContacts.length > 0
const showBackToTop = isPageScrolled || !isContactsListAtTop
const closeTaskCenter = useCallback(() => {
setIsTaskCenterOpen(false)
setExpandedPerfTaskId(null)
@@ -3923,10 +3908,6 @@ function ExportPage() {
showSessionDetailPanel,
toggleSelectSession
])
const handleBackToTop = useCallback(() => {
contactsVirtuosoRef.current?.scrollToIndex({ index: 0, align: 'start', behavior: 'smooth' })
window.scrollTo({ top: 0, behavior: 'smooth' })
}, [])
const handleContactsListWheelCapture = useCallback((event: WheelEvent<HTMLDivElement>) => {
const deltaY = event.deltaY
if (!deltaY) return
@@ -4563,16 +4544,6 @@ function ExportPage() {
</div>
</div>
{showBackToTop && (
<button
type="button"
className="back-to-top-btn"
onClick={handleBackToTop}
>
</button>
)}
{exportDialog.open && createPortal(
<div className="export-dialog-overlay" onClick={closeExportDialog}>
<div className="export-dialog" role="dialog" aria-modal="true" onClick={(event) => event.stopPropagation()}>