diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-14 20:59:26 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-14 20:59:26 +0100 |
commit | 3b81baaaaf51ff1c70fb1f865eef07fdb33a5950 (patch) | |
tree | fd3c5f038bdc3dcf08c3747220027160084329de /app/assets/javascripts/components/features/status/index.jsx | |
parent | 40a40537326aa168d20324bd8bd0e979d5083570 (diff) |
Adding POST /api/v1/reports API, and a UI for submitting reports
Diffstat (limited to 'app/assets/javascripts/components/features/status/index.jsx')
-rw-r--r-- | app/assets/javascripts/components/features/status/index.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx index 894fa3176..e269bb661 100644 --- a/app/assets/javascripts/components/features/status/index.jsx +++ b/app/assets/javascripts/components/features/status/index.jsx @@ -14,6 +14,7 @@ import { mentionCompose } from '../../actions/compose'; import { deleteStatus } from '../../actions/statuses'; +import { initReport } from '../../actions/reports'; import { makeGetStatus, getStatusAncestors, @@ -88,6 +89,10 @@ const Status = React.createClass({ this.props.dispatch(openMedia(media, index)); }, + handleReport (status) { + this.props.dispatch(initReport(status.get('account'), status)); + }, + renderChildren (list) { return list.map(id => <StatusContainer key={id} id={id} />); }, @@ -123,7 +128,7 @@ const Status = React.createClass({ {ancestors} <DetailedStatus status={status} me={me} onOpenMedia={this.handleOpenMedia} /> - <ActionBar status={status} me={me} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} onDelete={this.handleDeleteClick} onMention={this.handleMentionClick} /> + <ActionBar status={status} me={me} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} onDelete={this.handleDeleteClick} onMention={this.handleMentionClick} onReport={this.handleReport} /> {descendants} </div> |