Updating radio to use core data storage; Darken-ified radio overlay

This commit is contained in:
James Barnsley
2017-08-11 08:27:22 +12:00
parent a161facbbc
commit 4a82163519
5 changed files with 13 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -67,16 +67,16 @@ class Modal extends React.Component{
const mapStateToProps = (state, ownProps) => {
return {
current_track: (typeof(state.core.current_track) !== 'undefined' && typeof(state.core.tracks) !== 'undefined' && typeof(state.core.tracks[state.core.current_track.uri]) !== 'undefined' ? state.core.tracks[state.core.current_track.uri] : null),
current_track: (state.core.current_track !== undefined && state.core.tracks !== undefined && state.core.tracks[state.core.current_track.uri] !== undefined ? state.core.tracks[state.core.current_track.uri] : null),
uri_schemes: (state.mopidy.uri_schemes ? state.mopidy.uri_schemes : null),
search_settings: (state.ui.search_settings ? state.ui.search_settings : null),
volume: state.mopidy.volume,
mute: state.mopidy.mute,
modal: state.ui.modal,
radio: state.ui.radio,
radio: state.core.radio,
tracks: state.core.tracks,
artists: state.ui.artists,
playlists: state.ui.playlists,
artists: state.core.artists,
playlists: state.core.playlists,
context_menu: state.ui.context_menu,
mopidy_connected: state.mopidy.connected,
spotify_authorized: state.spotify.authorization

View File

@ -74,7 +74,7 @@ class Queue extends React.Component{
return (
<Link className={this.props.radio_enabled ? 'artwork radio-enabled' : 'artwork'} to={link}>
{this.props.radio_enabled ? <img className="radio-overlay" src="assets/radio-overlay.png" /> : null}
<Thumbnail image={image} />
<Thumbnail image={image} circle={this.props.radio_enabled} />
</Link>
)
}
@ -151,8 +151,8 @@ class Queue extends React.Component{
const mapStateToProps = (state, ownProps) => {
return {
radio: state.ui.radio,
radio_enabled: (state.ui.radio && state.ui.radio.enabled ? true : false),
radio: state.core.radio,
radio_enabled: (state.core.radio && state.core.radio.enabled ? true : false),
current_tracklist: state.core.current_tracklist,
current_track: (state.core.current_track !== undefined && state.core.tracks !== undefined && state.core.tracks[state.core.current_track.uri] !== undefined ? state.core.tracks[state.core.current_track.uri] : null)
}

View File

@ -172,11 +172,11 @@ input[type="submit"] {
.flag {
font-size: 10px;
margin-left: 3px;
margin-left: 5px;
padding: 1px 4px;
line-height: 1.2em;
vertical-align: top;
margin-top: 6px;
margin-top: 1px;
}
@include responsive( $bp_medium ){

View File

@ -26,14 +26,14 @@
&.radio-enabled {
.thumbnail {
box-sizing: border-box;
padding: 10%;
}
.radio-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
top: -15%;
left: -15%;
width: 130%;
height: 130%;
z-index: 2;
}
}