This commit is contained in:
Daniel Shleifman
2021-06-09 00:24:30 +03:00
parent 44b2f7f1bd
commit 5724485fa3
6 changed files with 137 additions and 213 deletions

View File

@@ -72,19 +72,15 @@ export const PiecesLengthWidget = ({ data }) => {
export const StatusWidget = ({ data }) => {
const { t } = useTranslation()
let i18nd = data
if (data.toLowerCase() === 'torrent added')
i18nd = t('TorrentAdded')
else if (data.toLowerCase() === 'torrent getting info')
i18nd = t('TorrentGettingInfo')
else if (data.toLowerCase() === 'torrent preload')
i18nd = t('TorrentPreload')
else if (data.toLowerCase() === 'torrent working')
i18nd = t('TorrentWorking')
else if (data.toLowerCase() === 'torrent closed')
i18nd = t('TorrentClosed')
else if (data.toLowerCase() === 'torrent in db')
i18nd = t('TorrentInDb')
return <StatisticsField title={t('TorrentStatus')} value={i18nd} iconBg='#aea25b' valueBg='#b4aa6e' icon={BuildIcon} />
if (data.toLowerCase() === 'torrent added') i18nd = t('TorrentAdded')
else if (data.toLowerCase() === 'torrent getting info') i18nd = t('TorrentGettingInfo')
else if (data.toLowerCase() === 'torrent preload') i18nd = t('TorrentPreload')
else if (data.toLowerCase() === 'torrent working') i18nd = t('TorrentWorking')
else if (data.toLowerCase() === 'torrent closed') i18nd = t('TorrentClosed')
else if (data.toLowerCase() === 'torrent in db') i18nd = t('TorrentInDb')
return (
<StatisticsField title={t('TorrentStatus')} value={i18nd} iconBg='#aea25b' valueBg='#b4aa6e' icon={BuildIcon} />
)
}
export const SizeWidget = ({ data }) => {