diff options
| author | 2026-01-14 13:50:25 +0800 | |
|---|---|---|
| committer | 2026-01-14 13:50:25 +0800 | |
| commit | d559a4624efb3cf5688a3df03a77f90999c42233 (patch) | |
| tree | 7fea897271685b08da52404aa6fbafe908345bed /ui/src/lib | |
| parent | 362ecdd0f86a9643aeaf78daebe16f8290bb2a36 (diff) | |
| download | DropOut-d559a4624efb3cf5688a3df03a77f90999c42233.tar.gz DropOut-d559a4624efb3cf5688a3df03a77f90999c42233.zip | |
feat: Consider incorporating totalDownloadedBytes into the calculation for a smoother progress indicator
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Diffstat (limited to 'ui/src/lib')
| -rw-r--r-- | ui/src/lib/DownloadMonitor.svelte | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/src/lib/DownloadMonitor.svelte b/ui/src/lib/DownloadMonitor.svelte index e4920ad..5dc8269 100644 --- a/ui/src/lib/DownloadMonitor.svelte +++ b/ui/src/lib/DownloadMonitor.svelte @@ -72,7 +72,9 @@ completedFiles = payload.completed_files; totalFiles = payload.total_files; if (totalFiles > 0) { - totalProgress = (completedFiles / totalFiles) * 100; + const currentFileFraction = + payload.total > 0 ? payload.downloaded / payload.total : 0; + totalProgress = ((completedFiles + currentFileFraction) / totalFiles) * 100; } // Calculate download speed (using moving average) |