mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 05:56:10 +05:00
translate sizes and show speeds in bps
This commit is contained in:
@@ -205,7 +205,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
||||
<LoadingProgress
|
||||
value={Filled}
|
||||
fullAmount={bufferSize}
|
||||
label={`${humanizeSize(bufferSize)} / ${humanizeSize(Filled) || '0 B'}`}
|
||||
label={`${humanizeSize(bufferSize)} / ${humanizeSize(Filled) || `0 ${t('B')}`}`}
|
||||
/>
|
||||
</SectionHeader>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
PhotoSizeSelectSmall as PhotoSizeSelectSmallIcon,
|
||||
Build as BuildIcon,
|
||||
} from '@material-ui/icons'
|
||||
import { getPeerString, humanizeSize } from 'utils/Utils'
|
||||
import { getPeerString, humanizeSize, humanizeSpeed } from 'utils/Utils'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { GETTING_INFO, IN_DB, CLOSED, PRELOAD, WORKING } from 'torrentStates'
|
||||
|
||||
@@ -21,7 +21,7 @@ export const DownlodSpeedWidget = ({ data }) => {
|
||||
return (
|
||||
<StatisticsField
|
||||
title={t('DownloadSpeed')}
|
||||
value={humanizeSize(data) || '0 B'}
|
||||
value={humanizeSpeed(data) || `0 ${t('bps')}`}
|
||||
iconBg={iconBGColor}
|
||||
valueBg={valueBGColor}
|
||||
icon={ArrowDownwardIcon}
|
||||
@@ -36,7 +36,7 @@ export const UploadSpeedWidget = ({ data }) => {
|
||||
return (
|
||||
<StatisticsField
|
||||
title={t('UploadSpeed')}
|
||||
value={humanizeSize(data) || '0 B'}
|
||||
value={humanizeSpeed(data) || `0 ${t('bps')}`}
|
||||
iconBg={iconBGColor}
|
||||
valueBg={valueBGColor}
|
||||
icon={ArrowUpwardIcon}
|
||||
@@ -51,7 +51,7 @@ export const PeersWidget = ({ data }) => {
|
||||
return (
|
||||
<StatisticsField
|
||||
title={t('Peers')}
|
||||
value={getPeerString(data) || '[0] 0 / 0'}
|
||||
value={getPeerString(data) || '0 · 0 / 0'}
|
||||
iconBg={iconBGColor}
|
||||
valueBg={valueBGColor}
|
||||
icon={SwapVerticalCircleIcon}
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
Close as CloseIcon,
|
||||
Delete as DeleteIcon,
|
||||
} from '@material-ui/icons'
|
||||
import { getPeerString, humanizeSize, removeRedundantCharacters } from 'utils/Utils'
|
||||
import { getPeerString, humanizeSize, humanizeSpeed, removeRedundantCharacters } from 'utils/Utils'
|
||||
import { torrentsHost } from 'utils/Hosts'
|
||||
import { NoImageIcon } from 'icons'
|
||||
import DialogTorrentDetailsContent from 'components/DialogTorrentDetailsContent'
|
||||
@@ -103,7 +103,7 @@ const Torrent = ({ torrent }) => {
|
||||
<div className='description-statistics-element-wrapper'>
|
||||
<div className='description-section-name'>{t('Speed')}</div>
|
||||
<div className='description-statistics-element-value'>
|
||||
{downloadSpeed > 0 ? humanizeSize(downloadSpeed) : '---'}
|
||||
{downloadSpeed > 0 ? humanizeSpeed(downloadSpeed) : '---'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user