Slider; Queue

This commit is contained in:
James Barnsley
2016-11-03 18:22:26 +13:00
parent 8f5e61a8f9
commit 6cee0a9daf
26 changed files with 799 additions and 299 deletions

View File

@ -11,6 +11,8 @@ import ArtistSentence from '../components/ArtistSentence'
import AlbumLink from '../components/AlbumLink'
import Header from '../components/Header'
import * as uiActions from '../services/ui/actions'
import * as spotifyActions from '../services/spotify/actions'
import * as mopidyActions from '../services/mopidy/actions'
class Queue extends React.Component{
@ -19,19 +21,6 @@ class Queue extends React.Component{
super(props);
}
renderTrackInFocus(){
if( this.props.mopidy && this.props.mopidy.trackInFocus ){
return (
<div>
<div>{ this.props.mopidy.trackInFocus.track.name }</div>
<div><ArtistSentence artists={ this.props.mopidy.trackInFocus.track.artists } /></div>
<div><AlbumLink album={ this.props.mopidy.trackInFocus.track.album } /></div>
</div>
);
}
return null;
}
renderTrackList(){
if( this.props.mopidy && this.props.mopidy.tracks ){
return (
@ -66,11 +55,7 @@ class Queue extends React.Component{
render(){
return (
<div className="view queue-view">
<Header
icon="play"
title="Now playing"
/>
{ this.renderTrackInFocus() }
<Player />
{ this.renderTrackList() }
</div>
);
@ -90,6 +75,8 @@ const mapStateToProps = (state, ownProps) => {
const mapDispatchToProps = (dispatch) => {
return {
uiActions: bindActionCreators(uiActions, dispatch),
spotifyActions: bindActionCreators(spotifyActions, dispatch),
mopidyActions: bindActionCreators(mopidyActions, dispatch)
}
}