Current track panel

This commit is contained in:
James Barnsley
2017-06-16 09:44:19 +12:00
parent 911f07a806
commit 1c1de75a6f
2 changed files with 32 additions and 4 deletions

View File

@ -59,15 +59,15 @@ class PlaybackControls extends React.Component{
return (
<div className="playback-controls">
<div className="current-track">
<a className="current-track">
<Thumbnail size="small" images={images} />
<div className="title">
{ this.props.current_track ? this.props.current_track.name : <span>-</span> }
</div>
<div className="artist">
{ this.props.current_track ? <ArtistSentence artists={ this.props.current_track.artists } /> : <ArtistSentence /> }
{ this.props.current_track ? <ArtistSentence nolinks artists={ this.props.current_track.artists } /> : <ArtistSentence /> }
</div>
</div>
</a>
<section className="playback">
<a className="control" onClick={() => this.props.mopidyActions.previous()}>

View File

@ -11,12 +11,40 @@
border-top: 1px solid $light_grey;
.current-track {
@include animate();
cursor: pointer;
position: absolute;
bottom: 51px;
background: $white;
height: 100px;
width: 220px;
border-top: 1px solid $light_grey;
font-size: 16px;
.thumbnail {
float: left;
margin: 12px;
}
.title {
padding-top: 18px;
@include one_line_text;
}
.artist-sentence {
opacity: 0.5;
display: block;
@include one_line_text;
.artist {
color: inherit;
text-decoration: none;
border-bottom: 1px dotted transparent;
}
}
&:hover {
background: $faint_grey;
}
}
.control {