Reordering local playlist tracks; Lazy-loading track details
This commit is contained in:
@ -73,8 +73,12 @@ class Playlist extends React.Component{
|
||||
this.props.mopidyActions.deletePlaylist( this.props.params.uri )
|
||||
}
|
||||
|
||||
removeTracks( track_indexes ){
|
||||
this.props.uiActions.removeTracksFromPlaylist( this.props.playlist.uri, track_indexes )
|
||||
reorderTracks( indexes, index ){
|
||||
this.props.uiActions.reorderPlaylistTracks( this.props.playlist.uri, indexes, index )
|
||||
}
|
||||
|
||||
removeTracks( tracks_indexes ){
|
||||
this.props.uiActions.removeTracksFromPlaylist( this.props.playlist.uri, tracks_indexes )
|
||||
}
|
||||
|
||||
renderEditButtons(){
|
||||
@ -138,7 +142,7 @@ class Playlist extends React.Component{
|
||||
</div>
|
||||
|
||||
<section className="list-wrapper">
|
||||
{ this.props.playlist.tracks ? <TrackList context="editable-playlist" tracks={ this.props.playlist.tracks } removeTracks={ track_indexes => this.removeTracks(track_indexes) } /> : null }
|
||||
{ this.props.playlist.tracks ? <TrackList context="editable-playlist" tracks={ this.props.playlist.tracks } removeTracks={ tracks_indexes => this.removeTracks(tracks_indexes) } reorderTracks={ (indexes, index) => this.reorderTracks(indexes, index) } /> : null }
|
||||
<LazyLoadListener loadMore={ () => this.loadMore() }/>
|
||||
</section>
|
||||
|
||||
|
||||
@ -37,6 +37,10 @@ class Queue extends React.Component{
|
||||
this.props.mopidyActions.changeTrack( tracks[0].tlid )
|
||||
}
|
||||
|
||||
reorderTracks( indexes, index ){
|
||||
this.props.mopidyActions.reorderTracklist( indexes, index )
|
||||
}
|
||||
|
||||
render(){
|
||||
return (
|
||||
<div className="view queue-view">
|
||||
@ -50,7 +54,8 @@ class Queue extends React.Component{
|
||||
tracks={this.props.current_tracklist}
|
||||
removeTracks={ tracks => this.removeTracks( tracks ) }
|
||||
playTracks={ tracks => this.playTracks( tracks ) }
|
||||
playTrack={ track => this.playTrack( track ) } />
|
||||
playTrack={ track => this.playTrack( track ) }
|
||||
reorderTracks={ (indexes, index) => this.reorderTracks(indexes, index) } />
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user