navidrome/ui/src/common/SongDetails.js

31 lines
782 B
JavaScript
Raw Normal View History

2020-04-14 20:59:16 +02:00
import React from 'react'
import {
Show,
SimpleShowLayout,
BooleanField,
DateField,
TextField
} from 'react-admin'
import { BitrateField, SizeField } from './index'
2020-04-14 20:59:16 +02:00
const SongDetails = (props) => {
const { record } = props
2020-04-14 20:59:16 +02:00
return (
<Show {...props} title=" ">
<SimpleShowLayout>
<TextField source="path" />
<TextField source="albumArtist" />
<TextField source="genre" />
<BooleanField source="compilation" />
<BitrateField source="bitRate" />
<DateField source="updatedAt" showTime />
<SizeField source="size" />
<TextField source="playCount" />
{record.playCount > 0 && <DateField source="playDate" showTime />}
2020-04-14 20:59:16 +02:00
</SimpleShowLayout>
</Show>
)
}
export default SongDetails