diff --git a/ElectronClient/app/gui/NoteSearchBar.jsx b/ElectronClient/app/gui/NoteSearchBar.jsx index 9baa678b3c..2b9c36b189 100644 --- a/ElectronClient/app/gui/NoteSearchBar.jsx +++ b/ElectronClient/app/gui/NoteSearchBar.jsx @@ -87,6 +87,13 @@ class NoteSearchBarComponent extends React.Component { if (this.props.onClose) this.props.onClose(); } + + if (event.keyCode === 70) { + // F key + if (event.ctrlKey) { + event.target.select(); + } + } } previousButton_click() { @@ -114,9 +121,9 @@ class NoteSearchBarComponent extends React.Component { return _('No matches found'); } if (this.props.resultCount === 1) { - return _('%d match found', this.props.resultCount); + return _('1 of 1 match'); } - return _('%d matches found', this.props.resultCount); + return _('%d of %d matches', this.props.selectedIndex + 1, this.props.resultCount); } render() { @@ -136,7 +143,7 @@ class NoteSearchBarComponent extends React.Component { const textStyle = Object.assign({ fontSize: theme.fontSize, fontFamily: theme.fontFamily, - color: theme.color, + color: theme.colorFaded, backgroundColor: theme.backgroundColor, }); const matchesFoundString = (this.props.query.length > 0) ? ( diff --git a/ElectronClient/app/gui/NoteText.jsx b/ElectronClient/app/gui/NoteText.jsx index 8496a609fb..c23e990a39 100644 --- a/ElectronClient/app/gui/NoteText.jsx +++ b/ElectronClient/app/gui/NoteText.jsx @@ -2157,6 +2157,7 @@ class NoteTextComponent extends React.Component { }} query={this.state.localSearch.result.query} resultCount={this.state.localSearch.result.count} + selectedIndex={this.state.localSearch.selectedIndex} onChange={this.noteSearchBar_change} onNext={this.noteSearchBar_next} onPrevious={this.noteSearchBar_previous}