Removing col w-XX format in lists; Collapse lists on responsive; Context menu check asset ability to be in library
This commit is contained in:
@ -25,7 +25,9 @@ class LibraryAlbums extends React.Component{
|
||||
}
|
||||
|
||||
componentDidMount(){
|
||||
if (!this.props.library_albums) this.props.spotifyActions.getLibraryAlbums();
|
||||
if (!this.props.library_albums_started){
|
||||
this.props.spotifyActions.getLibraryAlbums();
|
||||
}
|
||||
}
|
||||
|
||||
handleContextMenu(e,item){
|
||||
@ -33,7 +35,7 @@ class LibraryAlbums extends React.Component{
|
||||
e: e,
|
||||
context: 'album',
|
||||
uris: [item.uri],
|
||||
item: item
|
||||
items: [item]
|
||||
}
|
||||
this.props.uiActions.showContextMenu(data)
|
||||
}
|
||||
@ -59,33 +61,28 @@ class LibraryAlbums extends React.Component{
|
||||
if( this.props.view == 'list' ){
|
||||
var columns = [
|
||||
{
|
||||
width: 30,
|
||||
label: 'Name',
|
||||
name: 'name'
|
||||
},
|
||||
{
|
||||
width: 30,
|
||||
label: 'Artists',
|
||||
name: 'artists'
|
||||
},
|
||||
{
|
||||
width: 15,
|
||||
label: 'Added',
|
||||
name: 'added_at'
|
||||
},
|
||||
{
|
||||
width: 15,
|
||||
label: 'Released',
|
||||
name: 'release_date'
|
||||
},
|
||||
{
|
||||
width: 10,
|
||||
label: 'Tracks',
|
||||
name: 'tracks_total'
|
||||
}
|
||||
]
|
||||
return (
|
||||
<section className="list-wrapper">
|
||||
<section className="list-wrapper album-list">
|
||||
<List
|
||||
handleContextMenu={(e,item) => this.handleContextMenu(e,item)}
|
||||
rows={albums}
|
||||
@ -214,7 +211,8 @@ const mapStateToProps = (state, ownProps) => {
|
||||
sort: state.ui.library_albums_sort,
|
||||
sort_reverse: state.ui.library_albums_sort_reverse,
|
||||
library_albums: state.ui.library_albums,
|
||||
library_albums_more: state.ui.library_albums_more,
|
||||
library_albums_started: state.ui.library_albums_started,
|
||||
library_albums_more: state.ui.library_albums_more
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,13 +26,15 @@ class LibraryArtists extends React.Component{
|
||||
e: e,
|
||||
context: 'artist',
|
||||
uris: [item.uri],
|
||||
item: item
|
||||
items: [item]
|
||||
}
|
||||
this.props.uiActions.showContextMenu(data)
|
||||
}
|
||||
|
||||
componentDidMount(){
|
||||
if (!this.props.library_artists) this.props.spotifyActions.getLibraryArtists();
|
||||
if (!this.props.library_artists_started){
|
||||
this.props.spotifyActions.getLibraryArtists();
|
||||
}
|
||||
}
|
||||
|
||||
loadMore(){
|
||||
@ -55,22 +57,19 @@ class LibraryArtists extends React.Component{
|
||||
var columns = [
|
||||
{
|
||||
label: 'Name',
|
||||
width: 70,
|
||||
name: 'name'
|
||||
},
|
||||
{
|
||||
label: 'Followers',
|
||||
width: 15,
|
||||
name: 'followers.total'
|
||||
},
|
||||
{
|
||||
label: 'Popularity',
|
||||
width: 15,
|
||||
name: 'popularity'
|
||||
}
|
||||
]
|
||||
return (
|
||||
<section className="list-wrapper">
|
||||
<section className="list-wrapper artist-list">
|
||||
<List
|
||||
handleContextMenu={(e,item) => this.handleContextMenu(e,item)}
|
||||
rows={artists}
|
||||
@ -161,6 +160,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
sort: state.ui.library_artists_sort,
|
||||
sort_reverse: state.ui.library_artists_sort_reverse,
|
||||
library_artists: state.ui.library_artists,
|
||||
library_artists_started: state.ui.library_artists_started,
|
||||
library_artists_more: state.ui.library_artists_more,
|
||||
view: state.ui.library_artists_view
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ class LibraryLocalArtists extends React.Component{
|
||||
e: e,
|
||||
context: 'artist',
|
||||
uris: [item.uri],
|
||||
item: item
|
||||
items: [item]
|
||||
}
|
||||
this.props.uiActions.showContextMenu(data)
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ class LibraryPlaylists extends React.Component{
|
||||
e: e,
|
||||
context: 'playlist',
|
||||
uris: [item.uri],
|
||||
item: item
|
||||
items: [item]
|
||||
}
|
||||
this.props.uiActions.showContextMenu(data)
|
||||
}
|
||||
@ -60,33 +60,28 @@ class LibraryPlaylists extends React.Component{
|
||||
if( this.props.view == 'list' ){
|
||||
var columns = [
|
||||
{
|
||||
width: 50,
|
||||
label: 'Name',
|
||||
name: 'name'
|
||||
},
|
||||
{
|
||||
width: 20,
|
||||
label: 'Owner',
|
||||
name: 'owner'
|
||||
},
|
||||
{
|
||||
width: 10,
|
||||
label: 'Source',
|
||||
name: 'source'
|
||||
},
|
||||
{
|
||||
width: 10,
|
||||
label: 'Tracks',
|
||||
name: 'tracks_total'
|
||||
},
|
||||
{
|
||||
width: 10,
|
||||
label: 'Editable',
|
||||
name: 'can_edit'
|
||||
}
|
||||
]
|
||||
return (
|
||||
<section className="list-wrapper">
|
||||
<section className="list-wrapper playlist-list">
|
||||
<List
|
||||
handleContextMenu={(e,item) => this.handleContextMenu(e,item)}
|
||||
rows={playlists}
|
||||
|
||||
Reference in New Issue
Block a user