mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-19 08:14:15 +03:00
Add more padding tertiary info and the star icon, in Mobile simple list views. Fixes #466
This commit is contained in:
parent
a99924ea20
commit
e6d1e67297
@ -84,7 +84,7 @@ const AlbumListView = ({ hasShow, hasEdit, hasList, ...rest }) => {
|
|||||||
tertiaryText={(r) => (
|
tertiaryText={(r) => (
|
||||||
<>
|
<>
|
||||||
<RangeField record={r} source={'year'} sortBy={'maxYear'} />
|
<RangeField record={r} source={'year'} sortBy={'maxYear'} />
|
||||||
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
linkType={'show'}
|
linkType={'show'}
|
||||||
|
@ -7,8 +7,6 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
} from 'react-admin'
|
} from 'react-admin'
|
||||||
import { useMediaQuery } from '@material-ui/core'
|
import { useMediaQuery } from '@material-ui/core'
|
||||||
import { makeStyles } from '@material-ui/core/styles'
|
|
||||||
import StarBorderIcon from '@material-ui/icons/StarBorder'
|
|
||||||
import StarIcon from '@material-ui/icons/Star'
|
import StarIcon from '@material-ui/icons/Star'
|
||||||
import {
|
import {
|
||||||
DurationField,
|
DurationField,
|
||||||
@ -27,14 +25,6 @@ import { SongListActions } from './SongListActions'
|
|||||||
import { AlbumLinkField } from './AlbumLinkField'
|
import { AlbumLinkField } from './AlbumLinkField'
|
||||||
import AddToPlaylistDialog from '../dialogs/AddToPlaylistDialog'
|
import AddToPlaylistDialog from '../dialogs/AddToPlaylistDialog'
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
|
||||||
columnIcon: {
|
|
||||||
marginLeft: '3px',
|
|
||||||
marginTop: '-2px',
|
|
||||||
verticalAlign: 'text-top',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const SongFilter = (props) => (
|
const SongFilter = (props) => (
|
||||||
<Filter {...props} variant={'outlined'}>
|
<Filter {...props} variant={'outlined'}>
|
||||||
<SearchInput source="title" alwaysOn />
|
<SearchInput source="title" alwaysOn />
|
||||||
@ -47,7 +37,6 @@ const SongFilter = (props) => (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const SongList = (props) => {
|
const SongList = (props) => {
|
||||||
const classes = useStyles()
|
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
|
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
|
||||||
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('md'))
|
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('md'))
|
||||||
@ -74,7 +63,7 @@ const SongList = (props) => {
|
|||||||
tertiaryText={(r) => (
|
tertiaryText={(r) => (
|
||||||
<>
|
<>
|
||||||
<DurationField record={r} source={'duration'} />
|
<DurationField record={r} source={'duration'} />
|
||||||
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
linkType={(id, basePath, record) => dispatch(setTrack(record))}
|
linkType={(id, basePath, record) => dispatch(setTrack(record))}
|
||||||
@ -105,12 +94,6 @@ const SongList = (props) => {
|
|||||||
source={'starred'}
|
source={'starred'}
|
||||||
sortBy={'starred ASC, starredAt ASC'}
|
sortBy={'starred ASC, starredAt ASC'}
|
||||||
sortByOrder={'DESC'}
|
sortByOrder={'DESC'}
|
||||||
label={
|
|
||||||
<StarBorderIcon
|
|
||||||
fontSize={'small'}
|
|
||||||
className={classes.columnIcon}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</SongDatagrid>
|
</SongDatagrid>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user