Adding from_uri to dropzones
This commit is contained in:
@ -49,11 +49,11 @@ class Dropzones extends React.Component{
|
||||
|
||||
switch( target.action ){
|
||||
case 'enqueue':
|
||||
this.props.mopidyActions.enqueueURIs( uris )
|
||||
this.props.mopidyActions.enqueueURIs( uris, this.props.dragger.from_uri )
|
||||
break
|
||||
|
||||
case 'enqueue_next':
|
||||
this.props.mopidyActions.enqueueURIsNext( uris )
|
||||
this.props.mopidyActions.enqueueURIsNext( uris, this.props.dragger.from_uri )
|
||||
break
|
||||
|
||||
case 'add_to_playlist':
|
||||
|
||||
@ -88,7 +88,7 @@ class TrackList extends React.Component{
|
||||
if (!this.state.tracks[index].selected && !this.isRightClick(e) && !e.ctrlKey) this.toggleTrackSelections(e, index)
|
||||
|
||||
var selected_tracks = this.selectedTracks()
|
||||
this.props.uiActions.dragStart( e, this.props.context, selected_tracks, this.tracksIndexes(selected_tracks) )
|
||||
this.props.uiActions.dragStart( e, this.props.context, this.props.uri, selected_tracks, this.tracksIndexes(selected_tracks) )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -56,10 +56,11 @@ export function toggleSidebar( new_state = 'toggle' ){
|
||||
return action
|
||||
}
|
||||
|
||||
export function dragStart( e, context, victims, victims_indexes = false ){
|
||||
export function dragStart( e, context, from_uri = null, victims, victims_indexes = null ){
|
||||
return {
|
||||
type: 'DRAG_START',
|
||||
context: context,
|
||||
from_uri: from_uri,
|
||||
victims: victims,
|
||||
victims_indexes: victims_indexes,
|
||||
start_x: e.clientX,
|
||||
|
||||
@ -54,6 +54,7 @@ export default function reducer(ui = {}, action){
|
||||
dragging: true,
|
||||
active: false,
|
||||
context: action.context,
|
||||
from_uri: action.from_uri,
|
||||
victims: action.victims,
|
||||
victims_indexes: action.victims_indexes,
|
||||
start_x: action.start_x,
|
||||
|
||||
Reference in New Issue
Block a user