|
|
@ -163,21 +163,28 @@ export default class ColumnsArea extends ImmutablePureComponent { |
|
|
|
if (singleColumn) { |
|
|
|
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>; |
|
|
|
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 ? [ |
|
|
|
const content = columnIndex !== -1 ? ( |
|
|
|
<TabsBar key='tabs' />, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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}> |
|
|
|
<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)} |
|
|
|
{links.map(this.renderView)} |
|
|
|
</ReactSwipeableViews>, |
|
|
|
</ReactSwipeableViews> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<div key='content' className='columns-area columns-area--mobile'>{children}</div> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
floatingActionButton, |
|
|
|
return ( |
|
|
|
] : [ |
|
|
|
<div className='columns-area__panels'> |
|
|
|
<TabsBar key='tabs' />, |
|
|
|
<div className='columns-area__panels__pane' /> |
|
|
|
|
|
|
|
|
|
|
|
<div key='content' className='columns-area columns-area--mobile'>{children}</div>, |
|
|
|
<div className='columns-area__panels__main'> |
|
|
|
|
|
|
|
<TabsBar key='tabs' /> |
|
|
|
|
|
|
|
{content} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
floatingActionButton, |
|
|
|
<div className='columns-area__panels__pane' /> |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
{floatingActionButton} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|