Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
headers: new Headers({ Accept: M3U_MIME_TYPE }),
}).then((res) => {
const blob = new Blob([res.body], { type: M3U_MIME_TYPE })
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = `${record.name}.m3u`
document.body.appendChild(link)
link.click()
link.parentNode.removeChild(link)
}),
[record]
)
return (
<div>
<div>
<button label="{translate('resources.album.actions.playAll')}">
</button>
<button label="{translate('resources.album.actions.shuffle')}">
</button>
</div></div>
displayedFilters,
filterValues,
permanentFilter,
exporter,
basePath,
selectedIds,
onUnselectItems,
showFilter,
maxResults,
total,
ids,
...rest
}) => {
const isNotSmall = useMediaQuery((theme) => theme.breakpoints.up('sm'))
return (
{filters &&
cloneElement(filters, {
resource,
showFilter,
displayedFilters,
filterValues,
context: 'button',
})}
{isNotSmall && }
)
}
const PlaylistListActions = ({ className, ...rest }) => {
const isNotSmall = useMediaQuery((theme) => theme.breakpoints.up('sm'))
const translate = useTranslate()
return (
{translate('ra.action.create')}
{isNotSmall && }
)
}
}, [dispatch, data, ids])
const handlePlayLater = React.useCallback(() => {
dispatch(addTracks(data, ids))
}, [dispatch, data, ids])
const handleShuffle = React.useCallback(() => {
dispatch(shuffleTracks(data, ids))
}, [dispatch, data, ids])
const handleDownload = React.useCallback(() => {
subsonic.download(record.id)
}, [record])
return (
<div>
<div>
<button label="{translate('resources.album.actions.playAll')}">
</button>
<button label="{translate('resources.album.actions.shuffle')}">
</button>
</div></div>
displayedFilters,
filterValues,
permanentFilter,
exporter,
basePath,
selectedIds,
onUnselectItems,
showFilter,
maxResults,
total,
fullWidth,
...rest
}) => {
const isNotSmall = useMediaQuery((theme) => theme.breakpoints.up('sm'))
return (
{filters &&
cloneElement(filters, {
resource,
showFilter,
displayedFilters,
filterValues,
context: 'button',
})}
{isNotSmall ? (
) : (
)}
)
}
const ArtistListActions = ({ className, ...rest }) => {
const isNotSmall = useMediaQuery((theme) => theme.breakpoints.up('sm'))
return (
{isNotSmall && }
)
}
export const ArtistSimpleList = ({
linkType,
className,
classes: classesOverride,
data,
hasBulkActions,
ids,
loading,
selectedIds,
total,
...rest
}) => {
const classes = useStyles({ classes: classesOverride })
return (
(loading || total > 0) && (
{ids.map(
(id) =>
data[id] && (
<span> linkType(id)}>
<div>{data[id].name}</div>
{config.enableStarRating && (
</span>
leftIcon,
linkType,
onToggleItem,
primaryText,
rightAvatar,
rightIcon,
secondaryText,
selectedIds,
tertiaryText,
total,
...rest
}) => {
const classes = useStyles({ classes: classesOverride })
return (
(loading || total > 0) && (
{ids.map((id) => (
{leftIcon && (
{leftIcon(data[id], id)}
)}
{leftAvatar && (
{leftAvatar(data[id], id)}
className,
classes: classesOverride,
data,
hasBulkActions,
ids,
loading,
onToggleItem,
selectedIds,
total,
...rest
}) => {
const dispatch = useDispatch()
const classes = useStyles({ classes: classesOverride })
return (
(loading || total > 0) && (
{ids.map(
(id) =>
data[id] && (
<span> dispatch(setTrack(data[id]))}>
{data[id].title}
}
secondary={
<>
<span>
<span>
{data[id].artist}
</span>
<span></span></span></span>