Browse Source

Add back button to hashtag timeline again (#3587)

closed-social-v3
unarist 7 years ago
committed by Eugen Rochko
parent
commit
61fcdbbf7e
2 changed files with 5 additions and 1 deletions
  1. +4
    -1
      app/javascript/mastodon/components/column_header.js
  2. +1
    -0
      app/javascript/mastodon/features/hashtag_timeline/index.js

+ 4
- 1
app/javascript/mastodon/components/column_header.js View File

@ -14,6 +14,7 @@ class ColumnHeader extends React.PureComponent {
icon: PropTypes.string.isRequired, icon: PropTypes.string.isRequired,
active: PropTypes.bool, active: PropTypes.bool,
multiColumn: PropTypes.bool, multiColumn: PropTypes.bool,
showBackButton: PropTypes.bool,
children: PropTypes.node, children: PropTypes.node,
pinned: PropTypes.bool, pinned: PropTypes.bool,
onPin: PropTypes.func, onPin: PropTypes.func,
@ -53,7 +54,7 @@ class ColumnHeader extends React.PureComponent {
} }
render () { render () {
const { title, icon, active, children, pinned, onPin, multiColumn } = this.props;
const { title, icon, active, children, pinned, onPin, multiColumn, showBackButton } = this.props;
const { collapsed, animating } = this.state; const { collapsed, animating } = this.state;
const buttonClassName = classNames('column-header', { const buttonClassName = classNames('column-header', {
@ -90,7 +91,9 @@ class ColumnHeader extends React.PureComponent {
); );
} else if (multiColumn) { } else if (multiColumn) {
pinButton = <button key='pin-button' className='text-btn column-header__setting-btn' onClick={onPin}><i className='fa fa fa-plus' /> <FormattedMessage id='column_header.pin' defaultMessage='Pin' /></button>; pinButton = <button key='pin-button' className='text-btn column-header__setting-btn' onClick={onPin}><i className='fa fa fa-plus' /> <FormattedMessage id='column_header.pin' defaultMessage='Pin' /></button>;
}
if (!pinned && (multiColumn || showBackButton)) {
backButton = ( backButton = (
<button onClick={this.handleBackClick} className='column-header__back-button'> <button onClick={this.handleBackClick} className='column-header__back-button'>
<i className='fa fa-fw fa-chevron-left column-back-button__icon' /> <i className='fa fa-fw fa-chevron-left column-back-button__icon' />

+ 1
- 0
app/javascript/mastodon/features/hashtag_timeline/index.js View File

@ -117,6 +117,7 @@ class HashtagTimeline extends React.PureComponent {
onClick={this.handleHeaderClick} onClick={this.handleHeaderClick}
pinned={pinned} pinned={pinned}
multiColumn={multiColumn} multiColumn={multiColumn}
showBackButton={true}
/> />
<StatusListContainer <StatusListContainer

Loading…
Cancel
Save