Artist loader back; Removing 'go to album'; Fixing track info artwork
This commit is contained in:
@ -278,15 +278,6 @@ class ContextMenu extends React.Component{
|
||||
}
|
||||
}
|
||||
|
||||
goToAlbum(e){
|
||||
if (!this.props.menu.items || this.props.menu.items.length <= 0 || !this.props.menu.items[0].album_uri){
|
||||
return null;
|
||||
} else {
|
||||
this.props.uiActions.hideContextMenu();
|
||||
hashHistory.push(global.baseURL +'album/'+ this.props.menu.items[0].album_uri);
|
||||
}
|
||||
}
|
||||
|
||||
goToUser(e){
|
||||
if (!this.props.menu.items || this.props.menu.items.length <= 0 || !this.props.menu.items[0].user_uri){
|
||||
return null;
|
||||
@ -563,14 +554,6 @@ class ContextMenu extends React.Component{
|
||||
</div>
|
||||
)
|
||||
|
||||
var go_to_album = (
|
||||
<div className="context-menu__item">
|
||||
<a className="context-menu__item__link" onClick={e => this.goToAlbum(e)}>
|
||||
<span className="context-menu__item__label">Go to album</span>
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
|
||||
var go_to_user = (
|
||||
<div className="context-menu__item">
|
||||
<a className="context-menu__item__link" onClick={e => this.goToUser(e)}>
|
||||
@ -745,7 +728,6 @@ class ContextMenu extends React.Component{
|
||||
{toggle_loved}
|
||||
<div className="context-menu__divider" />
|
||||
{context.source == 'spotify' && context.items_count <= 5 ? go_to_recommendations : null}
|
||||
{context.items_count == 1 ? go_to_album : null}
|
||||
{context.items_count == 1 ? go_to_track : null}
|
||||
<div className="context-menu__divider" />
|
||||
{copy_uris}
|
||||
|
||||
@ -227,10 +227,10 @@ class Artist extends React.Component{
|
||||
return (
|
||||
<div className="body overview">
|
||||
<div className={"top-tracks col col--w"+(artist.related_artists && artist.related_artists.length > 0 ? "70" : "100")}>
|
||||
<h4>Top tracks</h4>
|
||||
{artist.tracks ? <h4>Top tracks</h4> : null}
|
||||
<div className="list-wrapper">
|
||||
<TrackList className="artist-track-list" uri={artist.uri} tracks={artist.tracks} />
|
||||
<LazyLoadListener forceLoader={is_loading_tracks} />
|
||||
<LazyLoadListener showLoader={is_loading_tracks} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -240,7 +240,7 @@ class Artist extends React.Component{
|
||||
|
||||
<div className="cf"></div>
|
||||
|
||||
<div className="albums">
|
||||
{artist.albums ? <div className="albums">
|
||||
<h4>
|
||||
Albums
|
||||
<DropdownField
|
||||
@ -268,7 +268,7 @@ class Artist extends React.Component{
|
||||
loadMore={() => this.loadMore()}
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
</div> : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -197,7 +197,16 @@ class Track extends React.Component{
|
||||
if (!this.props.track){
|
||||
return null
|
||||
} else {
|
||||
var track = helpers.collate(this.props.track, {tracks: this.props.tracks, artists: this.props.artists, albums: this.props.albums});
|
||||
var track = this.props.track;
|
||||
|
||||
// Flatten our simple album so we can inherit artwork
|
||||
if (track.album){
|
||||
var album = this.props.albums[track.album.uri];
|
||||
|
||||
if (album && album.images){
|
||||
track.images = album.images;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
@ -233,7 +242,7 @@ class Track extends React.Component{
|
||||
{track.track_number ? <span>Track {track.track_number}</span> : null}
|
||||
</li>
|
||||
{track.duration ? <li><Dater type="length" data={track.duration} /></li> : null}
|
||||
{track.popularity ? <li><Popularity popularity={track.popularity} /></li> : null}
|
||||
{track.popularity ? <li>{track.popularity}% popularity</li> : null}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user