|
|
@ -6,6 +6,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; |
|
|
|
|
|
|
|
import ReactSwipeableViews from 'react-swipeable-views'; |
|
|
|
import { links, getIndex, getLink } from './tabs_bar'; |
|
|
|
import { Link } from 'react-router-dom'; |
|
|
|
|
|
|
|
import BundleContainer from '../containers/bundle_container'; |
|
|
|
import ColumnLoading from './column_loading'; |
|
|
@ -153,11 +154,19 @@ export default class ColumnsArea extends ImmutablePureComponent { |
|
|
|
this.pendingIndex = null; |
|
|
|
|
|
|
|
if (singleColumn) { |
|
|
|
return columnIndex !== -1 ? ( |
|
|
|
<ReactSwipeableViews index={columnIndex} onChangeIndex={this.handleSwipe} onTransitionEnd={this.handleAnimationEnd} animateTransitions={shouldAnimate} springConfig={{ duration: '400ms', delay: '0s', easeFunction: 'ease' }} style={{ height: '100%' }}> |
|
|
|
const floatingActionButton = this.context.router.history.location.pathname === '/statuses/new' ? null : <Link key='floating-action-button' to='/statuses/new' className='floating-action-button'><i className='fa fa-pencil' /></Link>; |
|
|
|
|
|
|
|
return 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%' }}> |
|
|
|
{links.map(this.renderView)} |
|
|
|
</ReactSwipeableViews> |
|
|
|
) : <div className='columns-area'>{children}</div>; |
|
|
|
</ReactSwipeableViews>, |
|
|
|
|
|
|
|
floatingActionButton, |
|
|
|
] : [ |
|
|
|
<div className='columns-area'>{children}</div>, |
|
|
|
|
|
|
|
floatingActionButton, |
|
|
|
]; |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|