diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-10-01 04:57:27 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-10-06 00:32:06 +0200 |
commit | bd54ee294aa0038f81a46ae16547711eff775c56 (patch) | |
tree | 3f7d22a54a9610b64db8d61b51736f7503e18dfe /app/javascript/flavours/glitch/features/reblogs | |
parent | 7d79e1f31c02ea1e1d742aff8b00f45a1ba0e67b (diff) |
[Glitch] Add refresh button to list of rebloggers/favouriters in web UI
Port b0323d0888fcb4aa9f85a67422961a85b8ab6069 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/reblogs')
-rw-r--r-- | app/javascript/flavours/glitch/features/reblogs/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/reblogs/index.js b/app/javascript/flavours/glitch/features/reblogs/index.js index c842c4ec0..258070358 100644 --- a/app/javascript/flavours/glitch/features/reblogs/index.js +++ b/app/javascript/flavours/glitch/features/reblogs/index.js @@ -6,6 +6,7 @@ import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; import { fetchReblogs } from 'flavours/glitch/actions/interactions'; import AccountContainer from 'flavours/glitch/containers/account_container'; import Column from 'flavours/glitch/features/ui/components/column'; +import Icon from 'flavours/glitch/components/icon'; import ColumnHeader from 'flavours/glitch/components/column_header'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; @@ -13,6 +14,7 @@ import ScrollableList from 'flavours/glitch/components/scrollable_list'; const messages = defineMessages({ heading: { id: 'column.reblogged_by', defaultMessage: 'Boosted by' }, + refresh: { id: 'refresh', defaultMessage: 'Refresh' }, }); const mapStateToProps = (state, props) => ({ @@ -51,6 +53,10 @@ class Reblogs extends ImmutablePureComponent { this.column = c; } + handleRefresh = () => { + this.props.dispatch(fetchReblogs(this.props.params.statusId)); + } + render () { const { intl, accountIds, multiColumn } = this.props; @@ -72,6 +78,9 @@ class Reblogs extends ImmutablePureComponent { onClick={this.handleHeaderClick} showBackButton multiColumn={multiColumn} + extraButton={( + <button className='column-header__button' title={intl.formatMessage(messages.refresh)} aria-label={intl.formatMessage(messages.refresh)} onClick={this.handleRefresh}><Icon id='refresh' /></button> + )} /> <ScrollableList |