mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
parent
1e12e03cc8
commit
743390113a
1 changed files with 16 additions and 0 deletions
|
@ -267,6 +267,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
<span class="pointer" onClick={linkEvent(this, this.handleEditClick)}>edit</span>
|
<span class="pointer" onClick={linkEvent(this, this.handleEditClick)}>edit</span>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
{this.myComment &&
|
||||||
|
<li className="list-inline-item">
|
||||||
|
<span class="pointer" onClick={linkEvent(this, this.handleDeleteClick)}>delete</span>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
<li className="list-inline-item">
|
<li className="list-inline-item">
|
||||||
<a className="text-muted" href="test">link</a>
|
<a className="text-muted" href="test">link</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -294,6 +299,17 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleDeleteClick(i: CommentNode, event) {
|
||||||
|
let deleteForm: CommentFormI = {
|
||||||
|
content: "*deleted*",
|
||||||
|
edit_id: i.props.node.comment.id,
|
||||||
|
post_id: i.props.node.comment.post_id,
|
||||||
|
parent_id: i.props.node.comment.parent_id,
|
||||||
|
auth: null
|
||||||
|
};
|
||||||
|
WebSocketService.Instance.editComment(deleteForm);
|
||||||
|
}
|
||||||
|
|
||||||
handleReplyCancel(): any {
|
handleReplyCancel(): any {
|
||||||
this.state.showReply = false;
|
this.state.showReply = false;
|
||||||
this.state.showEdit = false;
|
this.state.showEdit = false;
|
||||||
|
|
Loading…
Reference in a new issue