RemoteTimeline: add filter box
This commit is contained in:
parent
1794e5a72d
commit
b6bec67eea
2 changed files with 24 additions and 1 deletions
|
@ -6,6 +6,7 @@ import StatusListContainer from '../ui/containers/status_list_container';
|
||||||
import Column from '../../components/column';
|
import Column from '../../components/column';
|
||||||
import ColumnSettingsContainer from './containers/column_settings_container';
|
import ColumnSettingsContainer from './containers/column_settings_container';
|
||||||
import HomeColumnHeader from '../../components/home_column_header';
|
import HomeColumnHeader from '../../components/home_column_header';
|
||||||
|
import IconButton from 'soapbox/components/icon_button';
|
||||||
import { expandRemoteTimeline } from '../../actions/timelines';
|
import { expandRemoteTimeline } from '../../actions/timelines';
|
||||||
import { connectRemoteStream } from '../../actions/streaming';
|
import { connectRemoteStream } from '../../actions/streaming';
|
||||||
import { getSettings } from 'soapbox/actions/settings';
|
import { getSettings } from 'soapbox/actions/settings';
|
||||||
|
@ -69,6 +70,10 @@ class RemoteTimeline extends React.PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleCloseClick = e => {
|
||||||
|
this.context.router.history.push('/timeline/fediverse');
|
||||||
|
}
|
||||||
|
|
||||||
handleLoadMore = maxId => {
|
handleLoadMore = maxId => {
|
||||||
const { dispatch, onlyMedia, instance } = this.props;
|
const { dispatch, onlyMedia, instance } = this.props;
|
||||||
dispatch(expandRemoteTimeline(instance, { maxId, onlyMedia }));
|
dispatch(expandRemoteTimeline(instance, { maxId, onlyMedia }));
|
||||||
|
@ -82,6 +87,14 @@ class RemoteTimeline extends React.PureComponent {
|
||||||
<HomeColumnHeader activeItem='fediverse' active={hasUnread} >
|
<HomeColumnHeader activeItem='fediverse' active={hasUnread} >
|
||||||
<ColumnSettingsContainer />
|
<ColumnSettingsContainer />
|
||||||
</HomeColumnHeader>
|
</HomeColumnHeader>
|
||||||
|
<div className='timeline-filter-message'>
|
||||||
|
<IconButton icon='close' onClick={this.handleCloseClick} />
|
||||||
|
<FormattedMessage
|
||||||
|
id='remote_timeline.filter_message'
|
||||||
|
defaultMessage='You are viewing the timeline of {instance}.'
|
||||||
|
values={{ instance }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<StatusListContainer
|
<StatusListContainer
|
||||||
scrollKey={`${timelineId}_${instance}_timeline`}
|
scrollKey={`${timelineId}_${instance}_timeline`}
|
||||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}:${instance}`}
|
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}:${instance}`}
|
||||||
|
@ -89,7 +102,7 @@ class RemoteTimeline extends React.PureComponent {
|
||||||
emptyMessage={
|
emptyMessage={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='empty_column.remote'
|
id='empty_column.remote'
|
||||||
defaultMessage='There is nothing here! Manually follow users from {instance} to fill it up'
|
defaultMessage='There is nothing here! Manually follow users from {instance} to fill it up.'
|
||||||
values={{ instance }}
|
values={{ instance }}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
|
@ -716,3 +716,13 @@
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.timeline-filter-message {
|
||||||
|
background-color: var(--brand-color--faint);
|
||||||
|
color: var(--primary-text-color);
|
||||||
|
padding: 15px 20px;
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue