Merge branch 'develop' into bugfix/patch-fix-mention-button-mobile
This commit is contained in:
@@ -4,10 +4,10 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import PropTypes from 'prop-types';
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Column from '../../components/column';
|
||||
import ColumnHeader from '../../components/column_header';
|
||||
import { expandCommunityTimeline } from '../../actions/timelines';
|
||||
import ColumnSettingsContainer from './containers/column_settings_container';
|
||||
import { connectCommunityStream } from '../../actions/streaming';
|
||||
import HomeColumnHeader from '../../components/home_column_header';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.community', defaultMessage: 'Local timeline' },
|
||||
@@ -79,14 +79,12 @@ class CommunityTimeline extends React.PureComponent {
|
||||
|
||||
return (
|
||||
<Column label={intl.formatMessage(messages.title)}>
|
||||
<ColumnHeader
|
||||
icon='users'
|
||||
<HomeColumnHeader
|
||||
activeItem='all'
|
||||
active={hasUnread}
|
||||
title={intl.formatMessage(messages.title)}
|
||||
>
|
||||
<ColumnSettingsContainer columnId={columnId} />
|
||||
</ColumnHeader>
|
||||
|
||||
<ColumnSettingsContainer />
|
||||
</HomeColumnHeader>
|
||||
<StatusListContainer
|
||||
scrollKey={`community_timeline-${columnId}`}
|
||||
timelineId={`community${onlyMedia ? ':media' : ''}`}
|
||||
|
||||
@@ -4,13 +4,9 @@ import { expandHomeTimeline } from '../../actions/timelines';
|
||||
import PropTypes from 'prop-types';
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Column from '../../components/column';
|
||||
import ColumnHeader from '../../components/column_header';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import ColumnSettingsContainer from './containers/column_settings_container';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { me } from '../../initial_state';
|
||||
import ComposeFormContainer from '../compose/containers/compose_form_container';
|
||||
import Avatar from '../../components/avatar';
|
||||
import HomeColumnHeader from '../../components/home_column_header';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.home', defaultMessage: 'Home' },
|
||||
@@ -19,7 +15,6 @@ const messages = defineMessages({
|
||||
const mapStateToProps = state => ({
|
||||
hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0,
|
||||
isPartial: state.getIn(['timelines', 'home', 'isPartial']),
|
||||
account: state.getIn(['accounts', me]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@@ -72,22 +67,16 @@ class HomeTimeline extends React.PureComponent {
|
||||
}
|
||||
|
||||
render () {
|
||||
const { intl, hasUnread, columnId, account } = this.props;
|
||||
const { intl, hasUnread, columnId } = this.props;
|
||||
|
||||
return (
|
||||
<Column label={intl.formatMessage(messages.title)}>
|
||||
|
||||
<div className='timeline-compose-block'>
|
||||
<div className='timeline-compose-block__avatar'>
|
||||
<Avatar account={account} size={46} />
|
||||
</div>
|
||||
<ComposeFormContainer shouldCondense={true} autoFocus={false}/>
|
||||
</div>
|
||||
|
||||
<ColumnHeader icon='home' active={hasUnread} title={intl.formatMessage(messages.title)}>
|
||||
<HomeColumnHeader
|
||||
activeItem='home'
|
||||
active={hasUnread}
|
||||
>
|
||||
<ColumnSettingsContainer />
|
||||
</ColumnHeader>
|
||||
|
||||
</HomeColumnHeader>
|
||||
<StatusListContainer
|
||||
scrollKey={`home_timeline-${columnId}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
|
||||
@@ -64,6 +64,10 @@ class Notifications extends React.PureComponent {
|
||||
this.props.dispatch(scrollTopNotifications(false));
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.dispatch(scrollTopNotifications(true));
|
||||
}
|
||||
|
||||
handleLoadGap = (maxId) => {
|
||||
this.props.dispatch(expandNotifications({ maxId }));
|
||||
};
|
||||
|
||||
@@ -24,17 +24,14 @@ import TabsBar from './components/tabs_bar';
|
||||
// import TrendsPanel from './components/trends_panel';
|
||||
import WhoToFollowPanel from './components/who_to_follow_panel';
|
||||
import LinkFooter from './components/link_footer';
|
||||
import ProfileInfoPanel from './components/profile_info_panel';
|
||||
import UserPanel from './components/user_panel';
|
||||
import PromoPanel from './components/promo_panel';
|
||||
import ProfilePage from 'gabsocial/pages/profile_page';
|
||||
import SearchPage from 'gabsocial/pages/search_page';
|
||||
import HomePage from 'gabsocial/pages/home_page';
|
||||
|
||||
import {
|
||||
Compose,
|
||||
Status,
|
||||
GettingStarted,
|
||||
PublicTimeline,
|
||||
CommunityTimeline,
|
||||
AccountTimeline,
|
||||
AccountGallery,
|
||||
@@ -110,17 +107,6 @@ const LAYOUT = {
|
||||
LEFT: null,
|
||||
RIGHT: null,
|
||||
},
|
||||
HOME: {
|
||||
LEFT: [
|
||||
<UserPanel />,
|
||||
<PromoPanel />,
|
||||
<LinkFooter />,
|
||||
],
|
||||
RIGHT: [
|
||||
// <TrendsPanel />,
|
||||
<WhoToFollowPanel />,
|
||||
],
|
||||
},
|
||||
DEFAULT: {
|
||||
LEFT: [
|
||||
<WhoToFollowPanel />,
|
||||
@@ -181,7 +167,8 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||
return (
|
||||
<Switch>
|
||||
<Redirect from='/' to='/home' exact />
|
||||
<WrappedRoute path='/home' exact layout={LAYOUT.HOME} component={HomeTimeline} content={children} />
|
||||
<WrappedRoute path='/home' exact page={HomePage} component={HomeTimeline} content={children} />
|
||||
<WrappedRoute path='/timeline/all' exact page={HomePage} component={CommunityTimeline} content={children} />
|
||||
|
||||
<WrappedRoute path='/groups' component={Groups} content={children} />
|
||||
<WrappedRoute path='/groups/:id' component={GroupTimeline} content={children} />
|
||||
|
||||
Reference in New Issue
Block a user