diff --git a/src/widgets/media-requests/MediaRequestStatsTile.tsx b/src/widgets/media-requests/MediaRequestStatsTile.tsx index fd81d8f0a..63b9c5498 100644 --- a/src/widgets/media-requests/MediaRequestStatsTile.tsx +++ b/src/widgets/media-requests/MediaRequestStatsTile.tsx @@ -1,4 +1,4 @@ -import { Card, Center, Flex, Stack, Text } from '@mantine/core'; +import { Box, Card, createStyles, Flex, FlexProps, Stack, Text } from '@mantine/core'; import { IconChartBar } from '@tabler/icons-react'; import { useTranslation } from 'next-i18next'; @@ -11,14 +11,23 @@ import { MediaRequestStatus } from './media-request-types'; const definition = defineWidget({ id: 'media-requests-stats', icon: IconChartBar, - options: {}, - component: MediaRequestStatsTile, + options: { + direction: { + type: 'select', + defaultValue: 'row', + data: [ + { label: 'Horizontal', value: 'horizontal' }, + { label: 'Vertical', value: 'vertical' }, + ], + }, + }, gridstack: { minWidth: 1, - minHeight: 2, + minHeight: 1, maxWidth: 12, maxHeight: 12, }, + component: MediaRequestStatsTile, }); export type MediaRequestStatsWidget = IWidget<(typeof definition)['id'], typeof definition>; @@ -36,41 +45,44 @@ function MediaRequestStatsTile({ widget }: MediaRequestStatsWidgetProps) { } return ( - - -
- - - {data.filter((x) => x.status === MediaRequestStatus.PendingApproval).length} - - - {t('stats.pending')} - - -
+ + + + + {data.filter((x) => x.status === MediaRequestStatus.PendingApproval).length} + + + {t('stats.pending')} + + - -
- - {data.filter((x) => x.type === 'tv').length} - - {t('stats.tvRequests')} - - -
+ + + + {data.filter((x) => x.type === 'tv').length} + + + {t('stats.tvRequests')} + + - -
- - {data.filter((x) => x.type === 'movie').length} - - {t('stats.movieRequests')} - - -
+ + + + {data.filter((x) => x.type === 'movie').length} + + + {t('stats.movieRequests')} + +
); } -export default definition; +export default definition; \ No newline at end of file