Parallax setup

This commit is contained in:
James Barnsley
2016-10-25 17:01:37 +13:00
parent 5372cd0334
commit ab9f317aed
15 changed files with 193 additions and 20 deletions

View File

@ -6,6 +6,9 @@ import { bindActionCreators } from 'redux'
import Header from '../components/Header'
import TrackList from '../components/TrackList'
import AlbumGrid from '../components/AlbumGrid'
import Thumbnail from '../components/Thumbnail'
import Parallax from '../components/Parallax'
import RelatedArtistList from '../components/RelatedArtistList'
import * as spotifyActions from '../services/spotify/actions'
@ -32,7 +35,10 @@ class Artist extends React.Component{
return (
<div>
<Header icon="mic" title={ this.props.spotify.artist.name } />
{ this.props.spotify.artist.images ? <Parallax images={ this.props.spotify.artist.images } /> : null }
{ this.props.spotify.artist.images ? <Thumbnail size="huge" images={ this.props.spotify.artist.images } /> : null }
<p>{ this.props.spotify.artist.followers.total.toLocaleString() } followers</p>
{ this.props.spotify.artist.related_artists ? <RelatedArtistList artists={ this.props.spotify.artist.related_artists } /> : null }
{ this.props.spotify.artist.tracks ? <TrackList tracks={ this.props.spotify.artist.tracks } /> : null }
{ this.props.spotify.artist_albums ? <AlbumGrid items={ this.props.spotify.artist_albums } /> : null }
</div>

View File

@ -67,7 +67,6 @@ class Queue extends React.Component{
title="Now playing"
/>
{ this.renderTrackInFocus() }
<h4>Other tracks</h4>
{ this.renderTrackList() }
</div>
);

View File

@ -48,7 +48,7 @@ class Settings extends React.Component{
<section>
<h3>Mopidy</h3>
<h3 className="underline">Mopidy</h3>
<form onSubmit={() => this.setMopidyConfig()}>
<label>
<span className="label">Host</span>
@ -61,7 +61,7 @@ class Settings extends React.Component{
<button type="submit">Apply</button>
</form>
<h3>Spotify</h3>
<h3 className="underline">Spotify</h3>
<form onSubmit={() => this.setSpotifyConfig()}>
<label>
<span className="label">Country</span>