diff --git a/app/javascript/gabsocial/features/status/components/detailed_status.js b/app/javascript/gabsocial/features/status/components/detailed_status.js index 7b87b54b..867f3c76 100644 --- a/app/javascript/gabsocial/features/status/components/detailed_status.js +++ b/app/javascript/gabsocial/features/status/components/detailed_status.js @@ -33,12 +33,17 @@ export default class DetailedStatus extends ImmutablePureComponent { compact: PropTypes.bool, showMedia: PropTypes.bool, onToggleMediaVisibility: PropTypes.func, + onShowRevisions: PropTypes.func, }; state = { height: null, }; + handleShowRevisions = () => { + this.props.onShowRevisions(this.props.status); + } + handleOpenVideo = (media, startTime) => { this.props.onOpenVideo(media, startTime); } @@ -187,11 +192,12 @@ export default class DetailedStatus extends ImmutablePureComponent { - {status.get('group') && ( -
- Posted in {status.getIn(['group', 'title'])} -
- )} + {(status.get('group') || status.get('revised_at') !== null) && ( +
+ {status.get('group') && Posted in {status.getIn(['group', 'title'])}} + {status.get('revised_at') !== null && Edited} +
+ )} diff --git a/app/javascript/gabsocial/features/status/index.js b/app/javascript/gabsocial/features/status/index.js index e4dd8f06..37c9cbc8 100644 --- a/app/javascript/gabsocial/features/status/index.js +++ b/app/javascript/gabsocial/features/status/index.js @@ -175,6 +175,10 @@ class Status extends ImmutablePureComponent { } } + handleShowRevisions = (status) => { + this.props.dispatch(openModal('STATUS_REVISION', { status })); + } + handleReplyClick = (status) => { let { askReplyConfirmation, dispatch, intl } = this.props; if (askReplyConfirmation) { @@ -504,6 +508,7 @@ class Status extends ImmutablePureComponent { domain={domain} showMedia={this.state.showMedia} onToggleMediaVisibility={this.handleToggleMediaVisibility} + onShowRevisions={this.handleShowRevisions} />