Album view

This commit is contained in:
James Barnsley
2016-10-31 09:25:15 +13:00
parent c1cbcddef6
commit 869d73231b
38 changed files with 6467 additions and 5656 deletions

View File

@ -14,18 +14,6 @@ const localstorageMiddleware = (function(){
switch( action.type ){
case 'PUSHER_SET_CONFIG':
var pusher = JSON.parse( localStorage.getItem('pusher') );
if( !pusher ) pusher = {};
Object.assign(
pusher,{
username: action.config.username,
port: action.config.port
}
);
localStorage.setItem('pusher', JSON.stringify(pusher));
break;
case 'PUSHER_CONNECTED':
var pusher = JSON.parse( localStorage.getItem('pusher') );
if( !pusher ) pusher = {};
@ -38,6 +26,13 @@ const localstorageMiddleware = (function(){
localStorage.setItem('pusher', JSON.stringify(pusher));
break;
case 'PUSHER_SET_PORT':
var pusher = JSON.parse( localStorage.getItem('pusher') );
if( !pusher ) pusher = {};
Object.assign( pusher, { port: action.port } );
localStorage.setItem('pusher', JSON.stringify(pusher));
break;
case 'PUSHER_CHANGE_USERNAME':
var pusher = JSON.parse( localStorage.getItem('pusher') );
if( !pusher ) pusher = {};