diff --git a/ui/src/player/PlayerList.js b/ui/src/player/PlayerList.js index 3e6e72669..5cab3bb44 100644 --- a/ui/src/player/PlayerList.js +++ b/ui/src/player/PlayerList.js @@ -7,22 +7,34 @@ import { FunctionField, ReferenceField } from 'react-admin' -import { Title } from '../common' +import { useMediaQuery } from '@material-ui/core' +import { SimpleList, Title } from '../common' -const PlayerList = (props) => ( - } exporter={false} {...props}> - - - +const PlayerList = (props) => { + const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs')) + return ( + } exporter={false} {...props}> + {isXsmall ? ( + r.client} + secondaryText={(r) => r.userName} + tertiaryText={(r) => (r.maxBitRate ? r.maxBitRate : 'Unlimited')} + /> + ) : ( + - - (r.maxBitRate ? r.maxBitRate : 'Unlimited')} - /> - - - -) + + + + (r.maxBitRate ? r.maxBitRate : 'Unlimited')} + /> + + + )} + + ) +} export default PlayerList diff --git a/ui/src/transcoding/TranscodingList.js b/ui/src/transcoding/TranscodingList.js index eace0c347..765ed3d82 100644 --- a/ui/src/transcoding/TranscodingList.js +++ b/ui/src/transcoding/TranscodingList.js @@ -1,16 +1,28 @@ import React from 'react' import { Datagrid, List, TextField } from 'react-admin' -import { Title } from '../common' +import { useMediaQuery } from '@material-ui/core' +import { SimpleList, Title } from '../common' -const TranscodingList = (props) => ( - } exporter={false} {...props}> - - - - - - - -) +const TranscodingList = (props) => { + const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs')) + return ( + } exporter={false} {...props}> + {isXsmall ? ( + r.name} + secondaryText={(r) => `format: ${r.targetFormat}`} + tertiaryText={(r) => r.defaultBitRate} + /> + ) : ( + + + + + + + )} + + ) +} export default TranscodingList