diff --git a/frontend/src/components/DownloadCard.tsx b/frontend/src/components/DownloadCard.tsx index 9789ba8..9f47a90 100644 --- a/frontend/src/components/DownloadCard.tsx +++ b/frontend/src/components/DownloadCard.tsx @@ -17,7 +17,7 @@ import { } from '@mui/material' import { useCallback } from 'react' import { RPCResult } from '../types' -import { ellipsis, formatSpeedMiB, mapProcessStatus, roundMiB } from '../utils' +import { ellipsis, formatSpeedMiB, mapProcessStatus, formatSize } from '../utils' type Props = { download: RPCResult @@ -86,7 +86,7 @@ const DownloadCard: React.FC = ({ download, onStop, onCopy }) => { {!isCompleted() ? formatSpeedMiB(download.progress.speed) : ''} - {roundMiB(download.info.filesize_approx ?? 0)} + {formatSize(download.info.filesize_approx ?? 0)} diff --git a/frontend/src/components/DownloadsListView.tsx b/frontend/src/components/DownloadsListView.tsx index a4d070c..84b0602 100644 --- a/frontend/src/components/DownloadsListView.tsx +++ b/frontend/src/components/DownloadsListView.tsx @@ -14,7 +14,7 @@ import { import { useRecoilValue } from 'recoil' import { activeDownloadsState } from '../atoms/downloads' import { useRPC } from '../hooks/useRPC' -import { ellipsis, formatSpeedMiB, roundMiB } from "../utils" +import { ellipsis, formatSpeedMiB, formatSize } from "../utils" const DownloadsListView: React.FC = () => { @@ -74,7 +74,7 @@ const DownloadsListView: React.FC = () => { /> {formatSpeedMiB(download.progress.speed)} - {roundMiB(download.info.filesize_approx ?? 0)} + {formatSize(download.info.filesize_approx ?? 0)}