Localstorage woes again; multiple requests; creating common components

This commit is contained in:
James Barnsley
2016-10-18 21:57:29 +13:00
parent bd3ac79055
commit 51bf248ac9
14 changed files with 179 additions and 17 deletions

View File

@ -14,12 +14,20 @@ const localstorageMiddleware = (function(){
case 'MOPIDY_SET_CONFIG':
var mopidy = {
host: action.host,
port: action.port
host: action.config.host,
port: action.config.port
};
localStorage.setItem('mopidy', JSON.stringify(mopidy));
break;
case 'SPOTIFY_SET_CONFIG':
var spotify = {
country: action.config.country,
locale: action.config.locale
};
localStorage.setItem('spotify', JSON.stringify(spotify));
break;
case 'SPOTIFY_COMPLETE_AUTHORIZATION':
var spotify = {
authorized: true,