Use old local timeline component for /public/local/fixed
This commit is contained in:
parent
3c1b10adf0
commit
f383bb01f5
2 changed files with 18 additions and 26 deletions
|
@ -21,7 +21,6 @@ import StatusListContainer from '../ui/containers/status_list_container';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
title: { id: 'column.firehose', defaultMessage: 'Live feeds' },
|
title: { id: 'column.firehose', defaultMessage: 'Live feeds' },
|
||||||
titleDefault: { id: 'column.community', defaultMessage: 'Local timeline' },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: use a proper React context later on
|
// TODO: use a proper React context later on
|
||||||
|
@ -55,7 +54,7 @@ const ColumnSettings = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const Firehose = ({ feedType, defaultColumn, multiColumn }) => {
|
const Firehose = ({ feedType, multiColumn }) => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const { signedIn } = useIdentity();
|
const { signedIn } = useIdentity();
|
||||||
|
@ -157,10 +156,20 @@ const Firehose = ({ feedType, defaultColumn, multiColumn }) => {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
const headerIcon = defaultColumn ? 'users' : 'globe';
|
return (
|
||||||
const headerTitle = defaultColumn ? messages.titleDefault : messages.title;
|
<Column bindToDocument={!multiColumn} ref={columnRef} label={intl.formatMessage(messages.title)}>
|
||||||
|
<ColumnHeader
|
||||||
|
icon='globe'
|
||||||
|
active={hasUnread}
|
||||||
|
title={intl.formatMessage(messages.title)}
|
||||||
|
onPin={handlePin}
|
||||||
|
onClick={handleHeaderClick}
|
||||||
|
multiColumn={multiColumn}
|
||||||
|
>
|
||||||
|
<ColumnSettings />
|
||||||
|
</ColumnHeader>
|
||||||
|
|
||||||
const sectionHeadline = defaultColumn || (
|
<div className='scrollable scrollable--flex'>
|
||||||
<div className='account__section-headline'>
|
<div className='account__section-headline'>
|
||||||
<NavLink exact to='/public/local'>
|
<NavLink exact to='/public/local'>
|
||||||
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
|
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
|
||||||
|
@ -174,23 +183,6 @@ const Firehose = ({ feedType, defaultColumn, multiColumn }) => {
|
||||||
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
|
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Column bindToDocument={!multiColumn} ref={columnRef} label={intl.formatMessage(messages.title)}>
|
|
||||||
<ColumnHeader
|
|
||||||
icon={headerIcon}
|
|
||||||
active={hasUnread}
|
|
||||||
title={intl.formatMessage(headerTitle)}
|
|
||||||
onPin={handlePin}
|
|
||||||
onClick={handleHeaderClick}
|
|
||||||
multiColumn={multiColumn}
|
|
||||||
>
|
|
||||||
<ColumnSettings />
|
|
||||||
</ColumnHeader>
|
|
||||||
|
|
||||||
<div className='scrollable scrollable--flex'>
|
|
||||||
{sectionHeadline}
|
|
||||||
|
|
||||||
<StatusListContainer
|
<StatusListContainer
|
||||||
prepend={prependBanner}
|
prepend={prependBanner}
|
||||||
|
@ -212,7 +204,6 @@ const Firehose = ({ feedType, defaultColumn, multiColumn }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
Firehose.propTypes = {
|
Firehose.propTypes = {
|
||||||
defaultColumn: PropTypes.bool,
|
|
||||||
multiColumn: PropTypes.bool,
|
multiColumn: PropTypes.bool,
|
||||||
feedType: PropTypes.string,
|
feedType: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,6 +66,7 @@ import {
|
||||||
Onboarding,
|
Onboarding,
|
||||||
About,
|
About,
|
||||||
PrivacyPolicy,
|
PrivacyPolicy,
|
||||||
|
CommunityTimeline,
|
||||||
} from './util/async-components';
|
} from './util/async-components';
|
||||||
import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
|
import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
|
||||||
|
|
||||||
|
@ -197,7 +198,7 @@ class SwitchingColumnsArea extends PureComponent {
|
||||||
<WrappedRoute path='/public' exact component={Firehose} componentParams={{ feedType: 'public' }} content={children} />
|
<WrappedRoute path='/public' exact component={Firehose} componentParams={{ feedType: 'public' }} content={children} />
|
||||||
<WrappedRoute path='/public/local' exact component={Firehose} componentParams={{ feedType: 'community' }} content={children} />
|
<WrappedRoute path='/public/local' exact component={Firehose} componentParams={{ feedType: 'community' }} content={children} />
|
||||||
<WrappedRoute path='/public/remote' exact component={Firehose} componentParams={{ feedType: 'public:remote' }} content={children} />
|
<WrappedRoute path='/public/remote' exact component={Firehose} componentParams={{ feedType: 'public:remote' }} content={children} />
|
||||||
<WrappedRoute path='/public/local/fixed' exact component={Firehose} componentParams={{ feedType: 'community', defaultColumn: true }} content={children} />
|
<WrappedRoute path='/public/local/fixed' exact component={CommunityTimeline} content={children} />
|
||||||
<WrappedRoute path={['/conversations', '/timelines/direct']} component={DirectTimeline} content={children} />
|
<WrappedRoute path={['/conversations', '/timelines/direct']} component={DirectTimeline} content={children} />
|
||||||
<WrappedRoute path='/tags/:id' component={HashtagTimeline} content={children} />
|
<WrappedRoute path='/tags/:id' component={HashtagTimeline} content={children} />
|
||||||
<WrappedRoute path='/lists/:id' component={ListTimeline} content={children} />
|
<WrappedRoute path='/lists/:id' component={ListTimeline} content={children} />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue