mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 09:25:47 +01:00
Merge pull request #1553 from InterN0te/patch-1
Use dynamic conversion for Torrent DownloadSpeed and UploadSpeed
This commit is contained in:
@@ -39,8 +39,6 @@ export const BitTorrentQueueItem = ({ torrent, width, app }: TorrentQueueItemPro
|
||||
const { classes } = useStyles();
|
||||
const { t } = useTranslation('modules/torrents-status');
|
||||
|
||||
const downloadSpeed = torrent.downloadSpeed / 1024 / 1024;
|
||||
const uploadSpeed = torrent.uploadSpeed / 1024 / 1024;
|
||||
const size = torrent.totalSelected;
|
||||
return (
|
||||
<Popover
|
||||
@@ -81,14 +79,14 @@ export const BitTorrentQueueItem = ({ torrent, width, app }: TorrentQueueItemPro
|
||||
{width > MIN_WIDTH_MOBILE && (
|
||||
<td>
|
||||
<Text className={classes.noTextBreak} size="xs">
|
||||
{downloadSpeed > 0 ? `${downloadSpeed.toFixed(1)} MB/s` : '-'}
|
||||
{torrent.downloadSpeed > 0 ? `${humanFileSize(torrent.downloadSpeed,false)}/s` : '-'}
|
||||
</Text>
|
||||
</td>
|
||||
)}
|
||||
{width > MIN_WIDTH_MOBILE && (
|
||||
<td>
|
||||
<Text className={classes.noTextBreak} size="xs">
|
||||
{uploadSpeed > 0 ? `${uploadSpeed.toFixed(1)} MB/s` : '-'}
|
||||
{torrent.uploadSpeed > 0 ? `${humanFileSize(torrent.uploadSpeed,false)}/s` : '-'}
|
||||
</Text>
|
||||
</td>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user