Test mode as icon in sidebar; Process for searching

This commit is contained in:
James Barnsley
2017-09-04 11:25:58 +12:00
parent e7f3f689ea
commit dc15e6bed0
8 changed files with 101 additions and 99 deletions

View File

@ -11,7 +11,6 @@ export default class SearchSettingsModal extends React.Component{
super(props)
this.state = {
spotify: true,
uri_schemes: []
}
}
@ -21,7 +20,6 @@ export default class SearchSettingsModal extends React.Component{
this.setState(Object.assign({},this.props.search_settings))
} else {
this.setState({
spotify: true,
uri_schemes: Object.assign([],this.props.uri_schemes)
})
}
@ -30,7 +28,6 @@ export default class SearchSettingsModal extends React.Component{
handleSubmit(e){
this.props.uiActions.set({search_settings: this.state})
this.props.uiActions.closeModal()
this.props.coreActions.startSearch('all', this.props.data.query)
}
handleToggle(scheme){
@ -54,16 +51,6 @@ export default class SearchSettingsModal extends React.Component{
<form onSubmit={e => this.handleSubmit(e)}>
<div className="list small">
<div className="list-item field checkbox white">
<label>
<input
type="checkbox"
name="enabled"
checked={ this.state.spotify }
onChange={ e => this.setState({ spotify: !this.state.spotify })} />
<span className="label">spotify &nbsp;<FontAwesome className="grey-text" name={helpers.sourceIcon('spotify')} /></span>
</label>
</div>
{
this.props.uri_schemes.map(scheme => {
return (