Beginning Draggability

This commit is contained in:
James Barnsley
2016-11-10 16:17:10 +13:00
parent 47377b5c78
commit 15c1d83440
12 changed files with 205 additions and 16 deletions

View File

@ -7,6 +7,7 @@ import { connect } from 'react-redux'
import Sidebar from '../components/Sidebar'
import ContextMenu from '../components/ContextMenu'
import Dragger from '../components/Dragger'
import * as uiActions from '../services/ui/actions'
import * as pusherActions from '../services/pusher/actions'
@ -93,13 +94,17 @@ class App extends React.Component{
}
render(){
var className = '';
if( this.props.dragger && this.props.dragger.dragging ) className += ' dragging'
return (
<div>
<div className={className}>
<Sidebar />
<main>
{this.props.children}
</main>
<ContextMenu state={this.props.context_menu} />
<Dragger />
</div>
);
}
@ -116,6 +121,7 @@ const mapStateToProps = (state, ownProps) => {
mopidy_connected: state.mopidy.connected,
spotify_authorized: state.spotify.authorized,
play_state: state.mopidy.play_state,
dragger: state.ui.dragger,
context_menu: state.ui.context_menu
}
}