about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/status/index.jsx
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-09 22:19:15 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-09 22:19:15 +0200
commit0634e8dee5026b06c95b7efe161a0930c7431d9b (patch)
tree66c0d805aa4e25b843bb98270a8478fc39ce0b40 /app/assets/javascripts/components/features/status/index.jsx
parent29e79f770f3388a1d2d0e169da9fec31467c77c9 (diff)
Improved how in-UI profiles look
Diffstat (limited to 'app/assets/javascripts/components/features/status/index.jsx')
-rw-r--r--app/assets/javascripts/components/features/status/index.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx
index 1d40f127b..cc7a2bfeb 100644
--- a/app/assets/javascripts/components/features/status/index.jsx
+++ b/app/assets/javascripts/components/features/status/index.jsx
@@ -10,6 +10,7 @@ import ActionBar             from './components/action_bar';
 import Column                from '../ui/components/column';
 import { favourite, reblog } from '../../actions/interactions';
 import { replyCompose }      from '../../actions/compose';
+import { deleteStatus }      from '../../actions/statuses';
 import {
   getStatus,
   getStatusAncestors,
@@ -57,8 +58,12 @@ const Status = React.createClass({
     this.props.dispatch(reblog(status));
   },
 
+  handleDeleteClick (status) {
+    this.props.dispatch(deleteStatus(status.get('id')));
+  },
+
   renderChildren (list) {
-    return list.map(s => <EmbeddedStatus status={s} me={this.props.me} key={s.get('id')} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />);
+    return list.map(s => <EmbeddedStatus status={s} me={this.props.me} key={s.get('id')} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} onDelete={this.handleDeleteClick} />);
   },
 
   render () {
@@ -80,7 +85,7 @@ const Status = React.createClass({
           <div>{this.renderChildren(ancestors)}</div>
 
           <DetailedStatus status={status} me={me} />
-          <ActionBar status={status} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />
+          <ActionBar status={status} me={me} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} onDelete={this.handleDeleteClick} />
 
           <div>{this.renderChildren(descendants)}</div>
         </div>