Column: remove ColumnBackButton from most places, fix DetailedStatus border-bottom, improve HashtagTimeline
This commit is contained in:
parent
43c86ff85c
commit
b47e7a3197
4 changed files with 14 additions and 7 deletions
|
@ -8,7 +8,6 @@ import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
import { connectHashtagStream } from '../../actions/streaming';
|
import { connectHashtagStream } from '../../actions/streaming';
|
||||||
import { isEqual } from 'lodash';
|
import { isEqual } from 'lodash';
|
||||||
import ColumnBackButton from '../../components/column_back_button';
|
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => ({
|
const mapStateToProps = (state, props) => ({
|
||||||
hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
|
hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
|
||||||
|
@ -26,8 +25,10 @@ class HashtagTimeline extends React.PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
title = () => {
|
title = () => {
|
||||||
const title = [this.props.params.id];
|
const title = [`#${this.props.params.id}`];
|
||||||
|
|
||||||
|
// TODO: wtf is all this?
|
||||||
|
// It exists in Mastodon's codebase, but undocumented
|
||||||
if (this.additionalFor('any')) {
|
if (this.additionalFor('any')) {
|
||||||
title.push(' ', <FormattedMessage key='any' id='hashtag.column_header.tag_mode.any' values={{ additional: this.additionalFor('any') }} defaultMessage='or {additional}' />);
|
title.push(' ', <FormattedMessage key='any' id='hashtag.column_header.tag_mode.any' values={{ additional: this.additionalFor('any') }} defaultMessage='or {additional}' />);
|
||||||
}
|
}
|
||||||
|
@ -43,6 +44,8 @@ class HashtagTimeline extends React.PureComponent {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: wtf is this?
|
||||||
|
// It exists in Mastodon's codebase, but undocumented
|
||||||
additionalFor = (mode) => {
|
additionalFor = (mode) => {
|
||||||
const { tags } = this.props.params;
|
const { tags } = this.props.params;
|
||||||
|
|
||||||
|
@ -108,9 +111,8 @@ class HashtagTimeline extends React.PureComponent {
|
||||||
const { id } = this.props.params;
|
const { id } = this.props.params;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column label={`#${id}`}>
|
<Column label={`#${id}`} transparent>
|
||||||
<ColumnBackButton />
|
<ColumnHeader active={hasUnread} title={this.title()} />
|
||||||
<ColumnHeader icon='hashtag' active={hasUnread} title={this.title()} />
|
|
||||||
<StatusListContainer
|
<StatusListContainer
|
||||||
scrollKey='hashtag_timeline'
|
scrollKey='hashtag_timeline'
|
||||||
timelineId={`hashtag:${id}`}
|
timelineId={`hashtag:${id}`}
|
||||||
|
|
|
@ -259,7 +259,7 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||||
<Redirect from='/canary' to='/about/canary' />
|
<Redirect from='/canary' to='/about/canary' />
|
||||||
<Redirect from='/canary.txt' to='/about/canary' />
|
<Redirect from='/canary.txt' to='/about/canary' />
|
||||||
|
|
||||||
<WrappedRoute path='/tags/:id' publicRoute component={HashtagTimeline} content={children} />
|
<WrappedRoute path='/tags/:id' publicRoute page={DefaultPage} component={HashtagTimeline} content={children} />
|
||||||
|
|
||||||
<WrappedRoute path='/lists' page={DefaultPage} component={Lists} content={children} />
|
<WrappedRoute path='/lists' page={DefaultPage} component={Lists} content={children} />
|
||||||
<WrappedRoute path='/list/:id' page={HomePage} component={ListTimeline} content={children} />
|
<WrappedRoute path='/list/:id' page={HomePage} component={ListTimeline} content={children} />
|
||||||
|
|
|
@ -332,7 +332,7 @@
|
||||||
.ui--chatroom {
|
.ui--chatroom {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|
||||||
.columns-area__panels__main .columns-area {
|
.columns-area__panels__main .columns-area .column {
|
||||||
height: calc(100vh - 100px);
|
height: calc(100vh - 100px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -160,6 +160,11 @@
|
||||||
.thread {
|
.thread {
|
||||||
&__status {
|
&__status {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
// Only display line if posts are below
|
||||||
|
&:last-child .detailed-status__action-bar {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__connector {
|
&__connector {
|
||||||
|
|
Loading…
Reference in a new issue