mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 16:43:41 +01:00
[Glitch] When search enabled, display hint in search popout
Port 7901f9f63e
to glitch-soc
This commit is contained in:
parent
5d647197ec
commit
70c308c4aa
3 changed files with 8 additions and 2 deletions
|
@ -9,6 +9,7 @@ import spring from 'react-motion/lib/spring';
|
||||||
|
|
||||||
// Utils.
|
// Utils.
|
||||||
import Motion from 'flavours/glitch/util/optional_motion';
|
import Motion from 'flavours/glitch/util/optional_motion';
|
||||||
|
import { searchEnabled } from 'flavours/glitch/util/initial_state';
|
||||||
|
|
||||||
// Messages.
|
// Messages.
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
|
@ -28,6 +29,10 @@ const messages = defineMessages({
|
||||||
defaultMessage: 'Simple text returns matching display names, usernames and hashtags',
|
defaultMessage: 'Simple text returns matching display names, usernames and hashtags',
|
||||||
id: 'search_popout.tips.text',
|
id: 'search_popout.tips.text',
|
||||||
},
|
},
|
||||||
|
full_text: {
|
||||||
|
defaultMessage: 'Simple text returns statuses you have written, favourited, boosted, or have been mentioned in, as well as matching usernames, display names, and hashtags.',
|
||||||
|
id: 'search_popout.tips.full_text',
|
||||||
|
},
|
||||||
user: {
|
user: {
|
||||||
defaultMessage: 'user',
|
defaultMessage: 'user',
|
||||||
id: 'search_popout.tips.user',
|
id: 'search_popout.tips.user',
|
||||||
|
@ -92,7 +97,7 @@ export default function DrawerSearchPopout ({ style }) {
|
||||||
<FormattedMessage {...messages.status} />
|
<FormattedMessage {...messages.status} />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<FormattedMessage {...messages.text} />
|
{ searchEnabled ? <FormattedMessage {...messages.full_text} /> : <FormattedMessage {...messages.text} /> }
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Motion>
|
</Motion>
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const links = [
|
||||||
<NavLink className='tabs-bar__link secondary' to='/timelines/public/local' data-preview-title-id='column.community' data-preview-icon='users' ><i className='fa fa-fw fa-users' /><FormattedMessage id='tabs_bar.local_timeline' defaultMessage='Local' /></NavLink>,
|
<NavLink className='tabs-bar__link secondary' to='/timelines/public/local' data-preview-title-id='column.community' data-preview-icon='users' ><i className='fa fa-fw fa-users' /><FormattedMessage id='tabs_bar.local_timeline' defaultMessage='Local' /></NavLink>,
|
||||||
<NavLink className='tabs-bar__link secondary' exact to='/timelines/public' data-preview-title-id='column.public' data-preview-icon='globe' ><i className='fa fa-fw fa-globe' /><FormattedMessage id='tabs_bar.federated_timeline' defaultMessage='Federated' /></NavLink>,
|
<NavLink className='tabs-bar__link secondary' exact to='/timelines/public' data-preview-title-id='column.public' data-preview-icon='globe' ><i className='fa fa-fw fa-globe' /><FormattedMessage id='tabs_bar.federated_timeline' defaultMessage='Federated' /></NavLink>,
|
||||||
|
|
||||||
<NavLink className='tabs-bar__link primary' style={{ flexGrow: '0', flexBasis: '30px' }} to='/getting-started' data-preview-title-id='getting_started.heading' data-preview-icon='asterisk' ><i className='fa fa-fw fa-asterisk' /></NavLink>,
|
<NavLink className='tabs-bar__link primary' style={{ flexGrow: '0', flexBasis: '30px' }} to='/getting-started' data-preview-title-id='getting_started.heading' data-preview-icon='bars' ><i className='fa fa-fw fa-bars' /></NavLink>,
|
||||||
];
|
];
|
||||||
|
|
||||||
export function getIndex (path) {
|
export function getIndex (path) {
|
||||||
|
|
|
@ -19,6 +19,7 @@ export const boostModal = getMeta('boost_modal');
|
||||||
export const favouriteModal = getMeta('favourite_modal');
|
export const favouriteModal = getMeta('favourite_modal');
|
||||||
export const deleteModal = getMeta('delete_modal');
|
export const deleteModal = getMeta('delete_modal');
|
||||||
export const me = getMeta('me');
|
export const me = getMeta('me');
|
||||||
|
export const searchEnabled = getMeta('search_enabled');
|
||||||
export const maxChars = (initialState && initialState.max_toot_chars) || 500;
|
export const maxChars = (initialState && initialState.max_toot_chars) || 500;
|
||||||
|
|
||||||
export default initialState;
|
export default initialState;
|
||||||
|
|
Loading…
Reference in a new issue