[Glitch] Add search item to tab bar for mobile devices
Port c9cbb8de70
to glitch-soc
This commit is contained in:
parent
76a3f373e3
commit
37a00d4c1d
|
@ -86,6 +86,7 @@ class Drawer extends React.Component {
|
|||
searchHidden,
|
||||
searchValue,
|
||||
submitted,
|
||||
isSearchPage,
|
||||
} = this.props;
|
||||
const computedClass = classNames('drawer', `mbstobon-${elefriend}`);
|
||||
|
||||
|
@ -110,7 +111,7 @@ class Drawer extends React.Component {
|
|||
/>
|
||||
<div className='contents'>
|
||||
<DrawerAccount account={account} />
|
||||
<Composer />
|
||||
{!isSearchPage && <Composer />}
|
||||
{multiColumn && <button className='mastodon' onClick={onClickElefriend} />}
|
||||
<DrawerResults
|
||||
results={results}
|
||||
|
@ -126,6 +127,7 @@ class Drawer extends React.Component {
|
|||
// Props.
|
||||
Drawer.propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
isSearchPage: PropTypes.bool,
|
||||
multiColumn: PropTypes.bool,
|
||||
|
||||
// State props.
|
||||
|
|
|
@ -8,6 +8,7 @@ import { isUserTouching } from 'flavours/glitch/util/is_mobile';
|
|||
export const links = [
|
||||
<NavLink className='tabs-bar__link primary' to='/timelines/home' data-preview-title-id='column.home' data-preview-icon='home' ><i className='fa fa-fw fa-home' /><FormattedMessage id='tabs_bar.home' defaultMessage='Home' /></NavLink>,
|
||||
<NavLink className='tabs-bar__link primary' to='/notifications' data-preview-title-id='column.notifications' data-preview-icon='bell' ><i className='fa fa-fw fa-bell' /><FormattedMessage id='tabs_bar.notifications' defaultMessage='Notifications' /></NavLink>,
|
||||
<NavLink className='tabs-bar__link primary' to='/search' data-preview-title-id='tabs_bar.search' data-preview-icon='bell' ><i className='fa fa-fw fa-search' /><FormattedMessage id='tabs_bar.search' defaultMessage='Search' /></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>,
|
||||
|
|
|
@ -437,6 +437,8 @@ export default class UI extends React.Component {
|
|||
<WrappedRoute path='/bookmarks' component={BookmarkedStatuses} content={children} />
|
||||
<WrappedRoute path='/pinned' component={PinnedStatuses} content={children} />
|
||||
|
||||
<WrappedRoute path='/search' component={Drawer} content={children} componentParams={{ isSearchPage: true }} />
|
||||
|
||||
<WrappedRoute path='/statuses/new' component={Drawer} content={children} />
|
||||
<WrappedRoute path='/statuses/:statusId' exact component={Status} content={children} />
|
||||
<WrappedRoute path='/statuses/:statusId/reblogs' component={Reblogs} content={children} />
|
||||
|
|
Loading…
Reference in New Issue