Nicer context menus
This commit is contained in:
@ -21,6 +21,12 @@ class LibraryArtists extends React.Component{
|
||||
super(props);
|
||||
}
|
||||
|
||||
handleContextMenu(e,uri){
|
||||
e.preventDefault()
|
||||
var data = { uris: [uri] }
|
||||
this.props.uiActions.showContextMenu( e, data, 'artist', 'click' )
|
||||
}
|
||||
|
||||
componentDidMount(){
|
||||
if (!this.props.library_artists) this.props.spotifyActions.getLibraryArtists();
|
||||
}
|
||||
@ -61,13 +67,19 @@ class LibraryArtists extends React.Component{
|
||||
]
|
||||
return (
|
||||
<section className="list-wrapper">
|
||||
<List rows={artists} columns={columns} link_prefix={global.baseURL+"artist/"} show_source_icon={true} />
|
||||
<List
|
||||
handleContextMenu={(e,uri) => this.handleContextMenu(e,uri)}
|
||||
rows={artists}
|
||||
columns={columns}
|
||||
link_prefix={global.baseURL+"artist/"} show_source_icon={true} />
|
||||
</section>
|
||||
)
|
||||
}else{
|
||||
return (
|
||||
<section className="grid-wrapper">
|
||||
<ArtistGrid artists={artists} />
|
||||
<ArtistGrid
|
||||
handleContextMenu={(e,uri) => this.handleContextMenu(e,uri)}
|
||||
artists={artists} />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user