diff --git a/src/js/components/ContextMenu.js b/src/js/components/ContextMenu.js index 1df605f8..e351e4dd 100755 --- a/src/js/components/ContextMenu.js +++ b/src/js/components/ContextMenu.js @@ -453,9 +453,9 @@ class ContextMenu extends React.Component{ {play_uris} {play_uris_next} {add_to_queue} - {this.canBeInLibrary() ? toggle_in_library : null} {go_to_artist} {copy_uris} + {this.canBeInLibrary() ? toggle_in_library : null} ) break @@ -464,9 +464,9 @@ class ContextMenu extends React.Component{ return (
{start_radio} - {this.canBeInLibrary() ? toggle_in_library : null} {context.source == 'spotify' ? go_to_recommendations : null} {copy_uris} + {this.canBeInLibrary() ? toggle_in_library : null}
) break @@ -475,9 +475,9 @@ class ContextMenu extends React.Component{ return (
{play_playlist} - {this.canBeInLibrary() ? toggle_in_library : null} {context.source == 'spotify' ? go_to_user : null} {copy_uris} + {this.canBeInLibrary() ? toggle_in_library : null}
) break @@ -487,6 +487,7 @@ class ContextMenu extends React.Component{
{play_queue_item} {add_to_playlist} + {context.source == 'spotify' ? go_to_recommendations : null} {copy_uris} {remove_from_queue}
diff --git a/src/js/components/SearchForm.js b/src/js/components/SearchForm.js index 446c0bdb..91830b02 100755 --- a/src/js/components/SearchForm.js +++ b/src/js/components/SearchForm.js @@ -19,7 +19,9 @@ class SearchForm extends React.Component{ } componentDidMount(){ - this.setState({query: this.props.query}) + if (this.props.query){ + this.setState({query: this.props.query}) + } } componentWillReceiveProps(newProps){ diff --git a/src/js/components/Sidebar.js b/src/js/components/Sidebar.js index 2442e698..c3f0ddd0 100755 --- a/src/js/components/Sidebar.js +++ b/src/js/components/Sidebar.js @@ -2,7 +2,7 @@ import React, { PropTypes } from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' -import { Link } from 'react-router' +import { Link, withRouter } from 'react-router' import Icon from './Icon' import Dropzones from './Dropzones' @@ -17,6 +17,14 @@ class Sidebar extends React.Component{ super(props) } + linkClassName(link){ + if (this.props.location.pathname.startsWith('/'+link)){ + return 'active' + } else { + return null + } + } + render(){ return (