Merge branch 'master' into feature/library

This commit is contained in:
James Barnsley
2017-08-11 08:59:29 +12:00
8 changed files with 29 additions and 20 deletions

View File

@ -12,7 +12,7 @@ from handlers import WebsocketHandler, HttpHandler
from core import IrisCore
logger = logging.getLogger(__name__)
__version__ = '3.1.3'
__version__ = '3.2.0'
##
# Core extension class

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -147,7 +147,7 @@ class App extends React.Component{
} else if (e.ctrlKey){
var volume = this.props.volume
if (volume !== 'false'){
volume -= 10
volume -= 5
if (volume < 0) volume = 0
this.props.mopidyActions.setVolume(volume)
if (this.props.mute) this.props.mopidyActions.setMute(false)
@ -164,7 +164,7 @@ class App extends React.Component{
} else if (e.ctrlKey){
var volume = this.props.volume
if (volume !== 'false'){
volume += 10
volume += 5
if (volume > 100) volume = 100
this.props.mopidyActions.setVolume(volume)
if (this.props.mute) this.props.mopidyActions.setMute(false)
@ -283,4 +283,4 @@ const mapDispatchToProps = (dispatch) => {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(App)
export default connect(mapStateToProps, mapDispatchToProps)(App)

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

@ -36,10 +36,19 @@ class TrackList extends React.Component{
}
handleKeyUp(e){
if (!this.digestTracksKeys()) return
switch(e.keyCode){
// When we're focussed on certian elements (like form input fields), don't fire any shortcuts
var ignoreNodes = ['INPUT', 'TEXTAREA']
if (ignoreNodes.indexOf(e.target.nodeName) > -1){
return false
}
// No tracks selected - no action required
if (!this.digestTracksKeys() || this.digestTracksKeys().length <= 0){
return
}
switch(e.keyCode){
case 13: // enter
this.playTracks();
break;

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;
}
}