Add category associated to each torrent

This commit is contained in:
LIAUD Corentin
2023-11-22 14:08:10 +01:00
parent 286609acec
commit 8c92856595
22 changed files with 171 additions and 70 deletions

View File

@@ -6,6 +6,7 @@ import {
Widgets as WidgetsIcon,
PhotoSizeSelectSmall as PhotoSizeSelectSmallIcon,
Build as BuildIcon,
Category as CategoryIcon,
} from '@material-ui/icons'
import { getPeerString, humanizeSize, humanizeSpeed } from 'utils/Utils'
import { useTranslation } from 'react-i18next'
@@ -126,3 +127,18 @@ export const SizeWidget = ({ data }) => {
/>
)
}
export const CategoryWidget = ({ data }) => {
const { t } = useTranslation()
const { iconBGColor, valueBGColor } = useGetWidgetColors('category')
return (
<StatisticsField
title={t('Category')}
value={data}
iconBg={iconBGColor}
valueBg={valueBGColor}
icon={CategoryIcon}
/>
)
}