Scolling rules
This commit is contained in:
@ -37,8 +37,10 @@ class Artist extends React.Component{
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps){
|
||||
|
||||
if (nextProps.params.uri != this.props.params.uri){
|
||||
this.props.coreActions.loadArtist(nextProps.params.uri);
|
||||
|
||||
}else if (!this.props.mopidy_connected && nextProps.mopidy_connected){
|
||||
if (helpers.uriSource(this.props.params.uri ) != 'spotify'){
|
||||
this.props.coreActions.loadArtist(nextProps.params.uri);
|
||||
@ -105,10 +107,10 @@ class Artist extends React.Component{
|
||||
|
||||
renderSubViewMenu(){
|
||||
return (
|
||||
<div className="sub-views">
|
||||
<Link className="option" activeClassName="active" to={global.baseURL+'artist/'+this.props.params.uri}><h4>Overview</h4></Link>
|
||||
{this.props.artist.related_artists_uris ? <Link className="option" activeClassName="active" to={global.baseURL+'artist/'+this.props.params.uri+'/related-artists'}><h4>Related artists</h4></Link> : null}
|
||||
<Link className="option" activeClassName="active" to={global.baseURL+'artist/'+this.props.params.uri+'/about'}><h4>About</h4></Link>
|
||||
<div className="sub-views" id="sub-views-menu">
|
||||
<Link className="option" activeClassName="active" to={global.baseURL+'artist/'+this.props.params.uri} scrollTo="sub-views-menu"><h4>Overview</h4></Link>
|
||||
{this.props.artist.related_artists_uris ? <Link className="option" activeClassName="active" to={global.baseURL+'artist/'+this.props.params.uri+'/related-artists'} scrollTo="sub-views-menu"><h4>Related artists</h4></Link> : null}
|
||||
<Link className="option" activeClassName="active" to={global.baseURL+'artist/'+this.props.params.uri+'/about'} scrollTo="sub-views-menu"><h4>About</h4></Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -223,7 +225,7 @@ class Artist extends React.Component{
|
||||
|
||||
<div className="col col--w5"></div>
|
||||
|
||||
{artist.related_artists && artist.related_artists.length > 0 ? <div className="col col--w25 related-artists"><h4>Related artists</h4><div className="list-wrapper"><RelatedArtists artists={artist.related_artists.slice(0,6)} /></div><Link to={global.baseURL+'artist/'+artist.uri+'/related-artists'} className="button grey">All related artists</Link></div> : null}
|
||||
{artist.related_artists && artist.related_artists.length > 0 ? <div className="col col--w25 related-artists"><h4>Related artists</h4><div className="list-wrapper"><RelatedArtists artists={artist.related_artists.slice(0,6)} /></div><Link to={global.baseURL+'artist/'+artist.uri+'/related-artists'} scrollTo="sub-views-menu" className="button grey">All related artists</Link></div> : null}
|
||||
|
||||
<div className="cf"></div>
|
||||
|
||||
|
||||
@ -243,7 +243,7 @@ class Track extends React.Component{
|
||||
<ContextMenuTrigger onTrigger={e => this.handleContextMenu(e)} />
|
||||
</div>
|
||||
|
||||
{!this.props.genius_authorized ? <p className="no-results">Want track lyrics? Authorize Genius under <Link to={global.baseURL+"settings/service/genius"}>Settings</Link>.</p> : null}
|
||||
{!this.props.genius_authorized ? <p className="no-results">Want track lyrics? Authorize Genius under <Link to={global.baseURL+"settings/service/genius"} scrollTo="services-menu">Settings</Link>.</p> : null}
|
||||
{this.props.genius_authorized ? this.renderLyricsSelector() : null}
|
||||
{this.props.genius_authorized ? this.renderLyrics() : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user