diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2023-04-01 09:59:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-01 09:59:10 +0200 |
commit | 2b113764117c9ab98875141bcf1758ba8be58173 (patch) | |
tree | 8928280ea2321d85518b857e000d1016378e6246 /app/javascript/mastodon/features/compose/containers/search_container.js | |
parent | 46483ae849bc06ee74f4745f4564b213e742c51c (diff) |
Change search pop-out in web UI (#24305)
Diffstat (limited to 'app/javascript/mastodon/features/compose/containers/search_container.js')
-rw-r--r-- | app/javascript/mastodon/features/compose/containers/search_container.js | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/compose/containers/search_container.js b/app/javascript/mastodon/features/compose/containers/search_container.js index 392bd0f56..3ee55fae5 100644 --- a/app/javascript/mastodon/features/compose/containers/search_container.js +++ b/app/javascript/mastodon/features/compose/containers/search_container.js @@ -4,12 +4,16 @@ import { clearSearch, submitSearch, showSearch, -} from '../../../actions/search'; + openURL, + clickSearchResult, + forgetSearchResult, +} from 'mastodon/actions/search'; import Search from '../components/search'; const mapStateToProps = state => ({ value: state.getIn(['search', 'value']), submitted: state.getIn(['search', 'submitted']), + recent: state.getIn(['search', 'recent']), }); const mapDispatchToProps = dispatch => ({ @@ -22,14 +26,26 @@ const mapDispatchToProps = dispatch => ({ dispatch(clearSearch()); }, - onSubmit () { - dispatch(submitSearch()); + onSubmit (type) { + dispatch(submitSearch(type)); }, onShow () { dispatch(showSearch()); }, + onOpenURL (routerHistory) { + dispatch(openURL(routerHistory)); + }, + + onClickSearchResult (q, type) { + dispatch(clickSearchResult(q, type)); + }, + + onForgetSearchResult (q) { + dispatch(forgetSearchResult(q)); + }, + }); export default connect(mapStateToProps, mapDispatchToProps)(Search); |