feat: new keybinds, language support etc

This commit is contained in:
David Ralph
2021-08-25 13:28:41 +01:00
parent 4a4e4604e8
commit 10f27d24b0
26 changed files with 348 additions and 69 deletions

View File

@@ -1,5 +1,6 @@
import { PureComponent } from 'react';
import { Search as SearchIcon, Mic } from '@material-ui/icons';
import Hotkeys from 'react-hot-keys';
import AutocompleteInput from '../../helpers/autocomplete/Autocomplete';
@@ -135,6 +136,7 @@ export default class Search extends PureComponent {
{this.state.microphone}
<SearchIcon onClick={this.searchButton}/>
<AutocompleteInput placeholder={this.language} id='searchtext' suggestions={this.state.suggestions} onChange={(e) => this.getSuggestions(e)} onClick={this.searchButton}/>
{window.keybinds.focusSearch && window.keybinds.focusSearch !== '' ? <Hotkeys keyName={window.keybinds.focusSearch} onKeyDown={() => document.getElementById('searchtext').focus()}/> : null}
</form>
);
}