|
|
|
@ -163,21 +163,28 @@ export default class ColumnsArea extends ImmutablePureComponent { |
|
|
|
|
if (singleColumn) { |
|
|
|
|
const floatingActionButton = shouldHideFAB(this.context.router.history.location.pathname) ? null : <Link key='floating-action-button' to='/statuses/new' className='floating-action-button' aria-label={intl.formatMessage(messages.publish)}><i className='fa fa-pencil' /></Link>; |
|
|
|
|
|
|
|
|
|
return columnIndex !== -1 ? [ |
|
|
|
|
<TabsBar key='tabs' />, |
|
|
|
|
|
|
|
|
|
const content = columnIndex !== -1 ? ( |
|
|
|
|
<ReactSwipeableViews key='content' index={columnIndex} onChangeIndex={this.handleSwipe} onTransitionEnd={this.handleAnimationEnd} animateTransitions={shouldAnimate} springConfig={{ duration: '400ms', delay: '0s', easeFunction: 'ease' }} style={{ height: '100%' }} disabled={!swipeToChangeColumns}> |
|
|
|
|
{links.map(this.renderView)} |
|
|
|
|
</ReactSwipeableViews>, |
|
|
|
|
</ReactSwipeableViews> |
|
|
|
|
) : ( |
|
|
|
|
<div key='content' className='columns-area columns-area--mobile'>{children}</div> |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className='columns-area__panels'> |
|
|
|
|
<div className='columns-area__panels__pane' /> |
|
|
|
|
|
|
|
|
|
floatingActionButton, |
|
|
|
|
] : [ |
|
|
|
|
<TabsBar key='tabs' />, |
|
|
|
|
<div className='columns-area__panels__main'> |
|
|
|
|
<TabsBar key='tabs' /> |
|
|
|
|
{content} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div key='content' className='columns-area columns-area--mobile'>{children}</div>, |
|
|
|
|
<div className='columns-area__panels__pane' /> |
|
|
|
|
|
|
|
|
|
floatingActionButton, |
|
|
|
|
]; |
|
|
|
|
{floatingActionButton} |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|