From f2c4b3b68b796787c8595e3ba900b66fdcc552ee Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 1 Sep 2023 16:15:40 +0200 Subject: [PATCH] Add some information about Full-text search being disabled in search popout --- .../features/compose/components/search.jsx | 28 ++++++++++--------- app/javascript/mastodon/locales/en.json | 1 + 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/javascript/mastodon/features/compose/components/search.jsx b/app/javascript/mastodon/features/compose/components/search.jsx index b90e9fe060f87..53e1db9d49704 100644 --- a/app/javascript/mastodon/features/compose/components/search.jsx +++ b/app/javascript/mastodon/features/compose/components/search.jsx @@ -8,7 +8,7 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { Icon } from 'mastodon/components/icon'; -import { searchEnabled } from 'mastodon/initial_state'; +import { domain, searchEnabled } from 'mastodon/initial_state'; import { HASHTAG_REGEX } from 'mastodon/utils/hashtags'; const messages = defineMessages({ @@ -354,18 +354,20 @@ class Search extends PureComponent { )} - {searchEnabled && ( - <> -

- -
- {this.defaultOptions.map(({ key, label, action }, i) => ( - - ))} -
- +

+ + {searchEnabled ? ( +
+ {this.defaultOptions.map(({ key, label, action }, i) => ( + + ))} +
+ ) : ( +
+ +
)} diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 2a99e8ebfdbe7..4399b99951336 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -590,6 +590,7 @@ "search.quick_action.open_url": "Open URL in Mastodon", "search.quick_action.status_search": "Posts matching {x}", "search.search_or_paste": "Search or paste URL", + "search_popout.full_text_search_disabled_message": "Not available on {domain}.", "search_popout.language_code": "ISO language code", "search_popout.options": "Search options", "search_popout.quick_actions": "Quick actions",