Revamp of asset designs
This commit is contained in:
@ -130,13 +130,13 @@ const PusherMiddleware = (function(){
|
||||
request({ action: 'get_version' })
|
||||
.then(
|
||||
response => {
|
||||
store.dispatch({ type: 'VERSION', version: response.data.version })
|
||||
store.dispatch({ type: 'VERSION', data: response.data })
|
||||
}
|
||||
)
|
||||
request({ action: 'get_radio' })
|
||||
.then(
|
||||
response => {
|
||||
store.dispatch({ type: 'RADIO', radio: response.data.radio })
|
||||
store.dispatch({ type: 'RADIO', data: response.data })
|
||||
}
|
||||
)
|
||||
return next(action);
|
||||
@ -155,7 +155,7 @@ const PusherMiddleware = (function(){
|
||||
}else{
|
||||
store.dispatch( uiActions.createNotification('Upgrade failed, please upgrade manually','bad') )
|
||||
}
|
||||
store.dispatch({ type: 'VERSION', version: response.data.version })
|
||||
store.dispatch({ type: 'VERSION', data: response.data })
|
||||
}
|
||||
)
|
||||
return next(action);
|
||||
|
||||
@ -86,15 +86,14 @@ const SpotifyMiddleware = (function(){
|
||||
}
|
||||
break
|
||||
|
||||
// when our mopidy server current track changes
|
||||
// when radio returns
|
||||
case 'RADIO':
|
||||
|
||||
// proceed as usual so we don't inhibit default functionality
|
||||
next(action)
|
||||
|
||||
// only resolve if radio is enabled
|
||||
if( action.radio.enabled ){
|
||||
store.dispatch(spotifyActions.resolveRadioSeeds(action.radio))
|
||||
if( action.data.radio.enabled ){
|
||||
store.dispatch(spotifyActions.resolveRadioSeeds(action.data.radio))
|
||||
}
|
||||
break
|
||||
|
||||
|
||||
@ -210,8 +210,8 @@ const UIMiddleware = (function(){
|
||||
break
|
||||
|
||||
case 'VERSION':
|
||||
if( action.version.upgrade_available )
|
||||
store.dispatch( uiActions.createNotification( 'Version '+action.version.latest+' is available. See settings to upgrade.' ) )
|
||||
if( action.data.version.upgrade_available )
|
||||
store.dispatch( uiActions.createNotification( 'Version '+action.data.version.latest+' is available. See settings to upgrade.' ) )
|
||||
next( action )
|
||||
break
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ export default function reducer(ui = {}, action){
|
||||
|
||||
case 'RADIO':
|
||||
case 'START_RADIO':
|
||||
return Object.assign({}, ui, { seeds_resolved: false }, { radio: action.radio })
|
||||
return Object.assign({}, ui, { seeds_resolved: false }, { radio: action.data.radio })
|
||||
|
||||
case 'RADIO_SEEDS_RESOLVED':
|
||||
var radio = Object.assign({}, ui.radio, { resolved_seeds: action.resolved_seeds })
|
||||
|
||||
Reference in New Issue
Block a user