This commit is contained in:
James Barnsley
2017-03-13 08:13:55 +13:00
9 changed files with 387 additions and 185 deletions

View File

@ -35,7 +35,7 @@ class LibraryAlbums extends React.Component{
e: e,
context: 'album',
uris: [item.uri],
item: item
items: [item]
}
this.props.uiActions.showContextMenu(data)
}
@ -61,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}
@ -216,8 +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
}
}

View File

@ -26,7 +26,7 @@ class LibraryArtists extends React.Component{
e: e,
context: 'artist',
uris: [item.uri],
item: item
items: [item]
}
this.props.uiActions.showContextMenu(data)
}
@ -57,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}
@ -163,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,
library_artists_started: state.ui.library_artists_started,
view: state.ui.library_artists_view

View File

@ -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)
}

View File

@ -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}