mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-14 14:22:28 +03:00
Fix AlbumLink label in Songs view
This commit is contained in:
parent
f8d9b1508e
commit
605253446a
@ -11,6 +11,5 @@ export const AlbumLinkField = (props) => (
|
|||||||
)
|
)
|
||||||
|
|
||||||
AlbumLinkField.defaultProps = {
|
AlbumLinkField.defaultProps = {
|
||||||
source: 'albumId',
|
|
||||||
addLabel: true
|
addLabel: true
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,7 @@ import {
|
|||||||
List,
|
List,
|
||||||
NumberField,
|
NumberField,
|
||||||
SearchInput,
|
SearchInput,
|
||||||
TextField,
|
TextField
|
||||||
useTranslate
|
|
||||||
} from 'react-admin'
|
} from 'react-admin'
|
||||||
import { useMediaQuery } from '@material-ui/core'
|
import { useMediaQuery } from '@material-ui/core'
|
||||||
import {
|
import {
|
||||||
@ -31,7 +30,6 @@ const SongFilter = (props) => (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const SongList = (props) => {
|
const SongList = (props) => {
|
||||||
const translate = useTranslate()
|
|
||||||
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'))
|
||||||
@ -65,13 +63,7 @@ const SongList = (props) => {
|
|||||||
rowClick={(id, basePath, record) => dispatch(setTrack(record))}
|
rowClick={(id, basePath, record) => dispatch(setTrack(record))}
|
||||||
>
|
>
|
||||||
<TextField source="title" />
|
<TextField source="title" />
|
||||||
{isDesktop && (
|
{isDesktop && <AlbumLinkField source="album" />}
|
||||||
<AlbumLinkField
|
|
||||||
source="albumId"
|
|
||||||
label={translate('resources.song.fields.album')}
|
|
||||||
sortBy="album"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<TextField source="artist" />
|
<TextField source="artist" />
|
||||||
{isDesktop && <NumberField source="trackNumber" />}
|
{isDesktop && <NumberField source="trackNumber" />}
|
||||||
{isDesktop && <NumberField source="playCount" />}
|
{isDesktop && <NumberField source="playCount" />}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user