Dropdown field; preliminary

This commit is contained in:
James Barnsley
2016-11-21 10:06:25 +13:00
parent ff8f3427e1
commit 8d1436996c
9 changed files with 189 additions and 8 deletions

View File

@ -59,6 +59,13 @@ export function dragEnd(){
return { type: 'DRAG_END' }
}
export function setView( view ){
return {
type: 'SET_VIEW',
view: view
}
}
export function reorderPlaylistTracks( uri, indexes, insert_before, snapshot_id = false ){
var range = helpers.createRange( indexes );
switch( helpers.uriSource( uri ) ){

View File

@ -7,6 +7,14 @@ export default function reducer(ui = {}, action){
case 'LAZY_LOADING':
return Object.assign({}, ui, { lazy_loading: action.start });
/**
* View views
**/
case 'SET_VIEW':
return Object.assign({}, ui, action.view)
/**
* Context menu
**/
@ -286,6 +294,7 @@ export default function reducer(ui = {}, action){
var playlist = Object.assign({}, ui.playlist, { following: action.is_following })
return Object.assign({}, ui, { playlist: playlist, following_loading: false });
/**
* Library Playlists
**/