summaryrefslogtreecommitdiffstats
path: root/web/react/components/rhs_comment.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/rhs_comment.jsx')
-rw-r--r--web/react/components/rhs_comment.jsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx
index 9c85e9940..0d15c8599 100644
--- a/web/react/components/rhs_comment.jsx
+++ b/web/react/components/rhs_comment.jsx
@@ -31,6 +31,7 @@ class RhsComment extends React.Component {
this.retryComment = this.retryComment.bind(this);
this.parseEmojis = this.parseEmojis.bind(this);
+ this.handlePermalink = this.handlePermalink.bind(this);
this.state = {};
}
@@ -67,6 +68,10 @@ class RhsComment extends React.Component {
parseEmojis() {
twemoji.parse(ReactDOM.findDOMNode(this), {size: Constants.EMOJI_SIZE});
}
+ handlePermalink(e) {
+ e.preventDefault();
+ EventHelpers.showGetPostLinkModal(this.props.post);
+ }
componentDidMount() {
this.parseEmojis();
}
@@ -92,6 +97,23 @@ class RhsComment extends React.Component {
var dropdownContents = [];
+ dropdownContents.push(
+ <li
+ key='rhs-root-permalink'
+ role='presentation'
+ >
+ <a
+ href='#'
+ onClick={this.handlePermalink}
+ >
+ <FormattedMessage
+ id='rhs_comment.permalink'
+ defaultMessage='Permalink'
+ />
+ </a>
+ </li>
+ );
+
if (isOwner) {
dropdownContents.push(
<li