[Glitch] Add some information about Full-text search being disabled in search popout
Port 9c1ef8302a
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
5d8c65f2a7
commit
9f3df3edee
|
@ -9,7 +9,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
|
|
||||||
|
|
||||||
import { Icon } from 'flavours/glitch/components/icon';
|
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 { focusRoot } from 'flavours/glitch/utils/dom_helpers';
|
||||||
import { HASHTAG_REGEX } from 'flavours/glitch/utils/hashtags';
|
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>
|
||||||
<>
|
|
||||||
<h4><FormattedMessage id='search_popout.options' defaultMessage='Search options' /></h4>
|
|
||||||
|
|
||||||
<div className='search__popout__menu'>
|
{searchEnabled ? (
|
||||||
{this.defaultOptions.map(({ key, label, action }, i) => (
|
<div className='search__popout__menu'>
|
||||||
<button key={key} onMouseDown={action} className={classNames('search__popout__menu__item', { selected: selectedOption === (options.length + i) })}>
|
{this.defaultOptions.map(({ key, label, action }, i) => (
|
||||||
{label}
|
<button key={key} onMouseDown={action} className={classNames('search__popout__menu__item', { selected: selectedOption === (options.length + i) })}>
|
||||||
</button>
|
{label}
|
||||||
))}
|
</button>
|
||||||
</div>
|
))}
|
||||||
</>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in New Issue