From c8147cafe33d2c0207b053a47a1e8fd1e329f6db Mon Sep 17 00:00:00 2001 From: Nexmoe <16796652+nexmoe@users.noreply.github.com> Date: Sun, 11 Jan 2026 16:34:40 +0800 Subject: [PATCH] fix(download): inline progress details (#81) --- .../src/components/download/DownloadItem.tsx | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/renderer/src/components/download/DownloadItem.tsx b/src/renderer/src/components/download/DownloadItem.tsx index 84c0261..0011474 100644 --- a/src/renderer/src/components/download/DownloadItem.tsx +++ b/src/renderer/src/components/download/DownloadItem.tsx @@ -400,6 +400,10 @@ export function DownloadItem({ download, isSelected = false, onToggleSelect }: D const statusIcon = getStatusIcon() const statusText = getStatusText() + const progressInfo = download.progress + const showInlineProgress = Boolean( + progressInfo && download.status !== 'completed' && download.status !== 'error' + ) const sourceDisplay = download.uploader && download.channel && download.uploader !== download.channel ? `${download.uploader} • ${download.channel}` @@ -725,6 +729,24 @@ export function DownloadItem({ download, isSelected = false, onToggleSelect }: D )} + {showInlineProgress && ( +
+ + {(progressInfo?.percent ?? 0).toFixed(1)}% + + {progressInfo?.downloaded && progressInfo?.total && ( + + {progressInfo.downloaded} / {progressInfo.total} + + )} + {progressInfo?.currentSpeed && ( + {progressInfo.currentSpeed} + )} + {progressInfo?.eta && ( + ETA: {progressInfo.eta} + )} +
+ )} {/* Timestamp */} {timestamp && ( {formatDateShort(timestamp)} @@ -898,26 +920,8 @@ export function DownloadItem({ download, isSelected = false, onToggleSelect }: D {/* Progress */} {download.progress && download.status !== 'completed' && download.status !== 'error' && ( -
+
-
- - {download.progress.percent.toFixed(1)}% - -
- {download.progress.downloaded && download.progress.total && ( - - {download.progress.downloaded} / {download.progress.total} - - )} - {download.progress.currentSpeed && ( - {download.progress.currentSpeed} - )} - {download.progress.eta && ( - ETA: {download.progress.eta} - )} -
-
)}