Upgrade Prettier to 2.0.4. Reformatted all JS files
This commit is contained in:
@@ -2,7 +2,7 @@ import {
|
||||
Button,
|
||||
sanitizeListRestProps,
|
||||
TopToolbar,
|
||||
useTranslate
|
||||
useTranslate,
|
||||
} from 'react-admin'
|
||||
import PlayArrowIcon from '@material-ui/icons/PlayArrow'
|
||||
import ShuffleIcon from '@material-ui/icons/Shuffle'
|
||||
@@ -65,5 +65,5 @@ export const AlbumActions = ({
|
||||
|
||||
AlbumActions.defaultProps = {
|
||||
selectedIds: [],
|
||||
onUnselectItems: () => null
|
||||
onUnselectItems: () => null,
|
||||
}
|
||||
|
||||
@@ -9,29 +9,29 @@ import subsonic from '../subsonic'
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
margin: '20px'
|
||||
margin: '20px',
|
||||
},
|
||||
gridListTile: {
|
||||
minHeight: '180px',
|
||||
minWidth: '180px'
|
||||
minWidth: '180px',
|
||||
},
|
||||
cover: {
|
||||
display: 'inline-block',
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
height: '100%',
|
||||
},
|
||||
tileBar: {
|
||||
textAlign: 'center',
|
||||
background:
|
||||
'linear-gradient(to top, rgba(0,0,0,0.8) 0%,rgba(0,0,0,0.4) 70%,rgba(0,0,0,0) 100%)'
|
||||
'linear-gradient(to top, rgba(0,0,0,0.8) 0%,rgba(0,0,0,0.4) 70%,rgba(0,0,0,0) 100%)',
|
||||
},
|
||||
albumArtistName: {
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
textAlign: 'center',
|
||||
fontSize: '1em'
|
||||
}
|
||||
fontSize: '1em',
|
||||
},
|
||||
}))
|
||||
|
||||
const getColsForWidth = (width) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
ReferenceInput,
|
||||
SearchInput,
|
||||
Pagination,
|
||||
useTranslate
|
||||
useTranslate,
|
||||
} from 'react-admin'
|
||||
import { Title } from '../common'
|
||||
import { withWidth } from '@material-ui/core'
|
||||
|
||||
@@ -35,7 +35,7 @@ const AlbumListActions = ({
|
||||
showFilter,
|
||||
displayedFilters,
|
||||
filterValues,
|
||||
context: 'button'
|
||||
context: 'button',
|
||||
})}
|
||||
<ButtonGroup
|
||||
variant="text"
|
||||
@@ -63,7 +63,7 @@ const AlbumListActions = ({
|
||||
|
||||
AlbumListActions.defaultProps = {
|
||||
selectedIds: [],
|
||||
onUnselectItems: () => null
|
||||
onUnselectItems: () => null,
|
||||
}
|
||||
|
||||
export default AlbumListActions
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
FunctionField,
|
||||
Show,
|
||||
SimpleShowLayout,
|
||||
TextField
|
||||
TextField,
|
||||
} from 'react-admin'
|
||||
import { DurationField, RangeField } from '../common'
|
||||
import { useMediaQuery } from '@material-ui/core'
|
||||
|
||||
+10
-10
@@ -6,7 +6,7 @@ import {
|
||||
ListToolbar,
|
||||
TextField,
|
||||
useListController,
|
||||
DatagridLoading
|
||||
DatagridLoading,
|
||||
} from 'react-admin'
|
||||
import classnames from 'classnames'
|
||||
import { useDispatch } from 'react-redux'
|
||||
@@ -20,7 +20,7 @@ const useStyles = makeStyles(
|
||||
(theme) => ({
|
||||
root: {},
|
||||
main: {
|
||||
display: 'flex'
|
||||
display: 'flex',
|
||||
},
|
||||
content: {
|
||||
marginTop: 0,
|
||||
@@ -28,29 +28,29 @@ const useStyles = makeStyles(
|
||||
position: 'relative',
|
||||
flex: '1 1 auto',
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
boxShadow: 'none'
|
||||
boxShadow: 'none',
|
||||
},
|
||||
overflow: 'inherit'
|
||||
overflow: 'inherit',
|
||||
},
|
||||
bulkActionsDisplayed: {
|
||||
marginTop: -theme.spacing(8),
|
||||
transition: theme.transitions.create('margin-top')
|
||||
transition: theme.transitions.create('margin-top'),
|
||||
},
|
||||
actions: {
|
||||
zIndex: 2,
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
flexWrap: 'wrap'
|
||||
flexWrap: 'wrap',
|
||||
},
|
||||
noResults: { padding: 20 }
|
||||
noResults: { padding: 20 },
|
||||
}),
|
||||
{ name: 'RaList' }
|
||||
)
|
||||
|
||||
const useStylesListToolbar = makeStyles({
|
||||
toolbar: {
|
||||
justifyContent: 'flex-start'
|
||||
}
|
||||
justifyContent: 'flex-start',
|
||||
},
|
||||
})
|
||||
|
||||
const trackName = (r) => {
|
||||
@@ -88,7 +88,7 @@ const AlbumSongs = (props) => {
|
||||
<Card
|
||||
className={classnames(classes.content, {
|
||||
[classes.bulkActionsDisplayed]:
|
||||
controllerProps.selectedIds.length > 0
|
||||
controllerProps.selectedIds.length > 0,
|
||||
})}
|
||||
key={version}
|
||||
>
|
||||
|
||||
@@ -15,5 +15,5 @@ export const ArtistLinkField = (props) => {
|
||||
|
||||
ArtistLinkField.defaultProps = {
|
||||
source: 'artistId',
|
||||
addLabel: true
|
||||
addLabel: true,
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ const albumListParams = {
|
||||
ALBUM_LIST_NEWEST: { sort: { field: 'created_at', order: 'DESC' } },
|
||||
ALBUM_LIST_RECENT: {
|
||||
sort: { field: 'play_date', order: 'DESC' },
|
||||
filter: { starred: true }
|
||||
}
|
||||
filter: { starred: true },
|
||||
},
|
||||
}
|
||||
|
||||
const selectAlbumList = (mode) => ({ type: mode })
|
||||
@@ -24,7 +24,7 @@ const albumViewReducer = (
|
||||
previousState = {
|
||||
mode: ALBUM_MODE_LIST,
|
||||
list: ALBUM_LIST_ALL,
|
||||
params: { sort: {}, filter: {} }
|
||||
params: { sort: {}, filter: {} },
|
||||
},
|
||||
payload
|
||||
) => {
|
||||
@@ -54,5 +54,5 @@ export {
|
||||
ALBUM_LIST_STARRED,
|
||||
albumViewReducer,
|
||||
selectViewMode,
|
||||
selectAlbumList
|
||||
selectAlbumList,
|
||||
}
|
||||
|
||||
@@ -5,5 +5,5 @@ import AlbumShow from './AlbumShow'
|
||||
export default {
|
||||
list: AlbumList,
|
||||
show: AlbumShow,
|
||||
icon: AlbumIcon
|
||||
icon: AlbumIcon,
|
||||
}
|
||||
|
||||
+13
-13
@@ -4,44 +4,44 @@ export const useStyles = makeStyles((theme) => ({
|
||||
container: {
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
padding: '0.7em',
|
||||
minWidth: '24em'
|
||||
minWidth: '24em',
|
||||
},
|
||||
[theme.breakpoints.up('sm')]: {
|
||||
padding: '1em',
|
||||
minWidth: '32em'
|
||||
}
|
||||
minWidth: '32em',
|
||||
},
|
||||
},
|
||||
albumCover: {
|
||||
display: 'inline-block',
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
height: '8em',
|
||||
width: '8em'
|
||||
width: '8em',
|
||||
},
|
||||
[theme.breakpoints.up('sm')]: {
|
||||
height: '10em',
|
||||
width: '10em'
|
||||
width: '10em',
|
||||
},
|
||||
[theme.breakpoints.up('lg')]: {
|
||||
height: '15em',
|
||||
width: '15em'
|
||||
}
|
||||
width: '15em',
|
||||
},
|
||||
},
|
||||
albumDetails: {
|
||||
display: 'inline-block',
|
||||
verticalAlign: 'top',
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
width: '14em'
|
||||
width: '14em',
|
||||
},
|
||||
[theme.breakpoints.up('sm')]: {
|
||||
width: '26em'
|
||||
width: '26em',
|
||||
},
|
||||
[theme.breakpoints.up('lg')]: {
|
||||
width: '38em'
|
||||
}
|
||||
width: '38em',
|
||||
},
|
||||
},
|
||||
albumTitle: {
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis'
|
||||
}
|
||||
textOverflow: 'ellipsis',
|
||||
},
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user