2020-04-14 20:59:16 +02:00
|
|
|
import React from 'react'
|
|
|
|
import {
|
|
|
|
Show,
|
|
|
|
SimpleShowLayout,
|
|
|
|
BooleanField,
|
|
|
|
DateField,
|
|
|
|
TextField
|
|
|
|
} from 'react-admin'
|
2020-04-14 21:23:11 +02:00
|
|
|
import { BitrateField, SizeField } from './index'
|
2020-04-14 20:59:16 +02:00
|
|
|
|
|
|
|
const SongDetails = (props) => {
|
2020-04-14 21:23:11 +02:00
|
|
|
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 />
|
2020-04-14 21:23:11 +02:00
|
|
|
<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
|