~cytrogen/masto-fe

9f3df3edee2039e171e715da8c153c963ff8d922 — Claire 2 years ago 5d8c65f
[Glitch] Add some information about Full-text search being disabled in search popout

Port 9c1ef8302abe52f6b41eeafadc1bc30dfa079e18 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
1 files changed, 15 insertions(+), 13 deletions(-)

M app/javascript/flavours/glitch/features/compose/components/search.jsx
M app/javascript/flavours/glitch/features/compose/components/search.jsx => app/javascript/flavours/glitch/features/compose/components/search.jsx +15 -13
@@ 9,7 9,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';


import { Icon } from 'flavours/glitch/components/icon';
import { searchEnabled } from 'flavours/glitch/initial_state';
import { domain, searchEnabled } from 'flavours/glitch/initial_state';
import { focusRoot } from 'flavours/glitch/utils/dom_helpers';
import { HASHTAG_REGEX } from 'flavours/glitch/utils/hashtags';



@@ 363,18 363,20 @@ class Search extends PureComponent {
            </>
          )}

          {searchEnabled && (
            <>
              <h4><FormattedMessage id='search_popout.options' defaultMessage='Search options' /></h4>

              <div className='search__popout__menu'>
                {this.defaultOptions.map(({ key, label, action }, i) => (
                  <button key={key} onMouseDown={action} className={classNames('search__popout__menu__item', { selected: selectedOption === (options.length + i) })}>
                    {label}
                  </button>
                ))}
              </div>
            </>
          <h4><FormattedMessage id='search_popout.options' defaultMessage='Search options' /></h4>

          {searchEnabled ? (
            <div className='search__popout__menu'>
              {this.defaultOptions.map(({ key, label, action }, i) => (
                <button key={key} onMouseDown={action} className={classNames('search__popout__menu__item', { selected: selectedOption === (options.length + i) })}>
                  {label}
                </button>
              ))}
            </div>
          ) : (
            <div className='search__popout__menu__message'>
              <FormattedMessage id='search_popout.full_text_search_disabled_message' defaultMessage='Not available on {domain}.' values={{ domain }} />
            </div>
          )}
        </div>
      </div>