feat: implement AlbumShow using a Datagrid. WIP: still need to make it responsive
This commit is contained in:
+12
-12
@@ -1,4 +1,4 @@
|
||||
import React, { Fragment } from 'react'
|
||||
import React from 'react'
|
||||
import {
|
||||
BooleanField,
|
||||
Datagrid,
|
||||
@@ -13,12 +13,18 @@ import {
|
||||
TextInput
|
||||
} from 'react-admin'
|
||||
import { useMediaQuery } from '@material-ui/core'
|
||||
import { BitrateField, DurationField, Pagination, Title } from '../common'
|
||||
import AddToQueueButton from './AddToQueueButton'
|
||||
import { PlayButton, SimpleList } from '../common'
|
||||
import {
|
||||
BitrateField,
|
||||
DurationField,
|
||||
Pagination,
|
||||
PlayButton,
|
||||
SimpleList,
|
||||
Title
|
||||
} from '../common'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { setTrack, addTrack } from '../player'
|
||||
import { addTrack, setTrack } from '../player'
|
||||
import AddIcon from '@material-ui/icons/Add'
|
||||
import { SongBulkActions } from './SongBulkActions'
|
||||
|
||||
const SongFilter = (props) => (
|
||||
<Filter {...props}>
|
||||
@@ -28,12 +34,6 @@ const SongFilter = (props) => (
|
||||
</Filter>
|
||||
)
|
||||
|
||||
const SongBulkActionButtons = (props) => (
|
||||
<Fragment>
|
||||
<AddToQueueButton {...props} />
|
||||
</Fragment>
|
||||
)
|
||||
|
||||
const SongDetails = (props) => {
|
||||
return (
|
||||
<Show {...props} title=" ">
|
||||
@@ -59,7 +59,7 @@ const SongList = (props) => {
|
||||
title={<Title subTitle={'Songs'} />}
|
||||
sort={{ field: 'title', order: 'ASC' }}
|
||||
exporter={false}
|
||||
bulkActionButtons={<SongBulkActionButtons />}
|
||||
bulkActionButtons={<SongBulkActions />}
|
||||
filters={<SongFilter />}
|
||||
perPage={isXsmall ? 50 : 15}
|
||||
pagination={<Pagination />}
|
||||
|
||||
Reference in New Issue
Block a user