Added permalink feature to posts in the RHS
Этот коммит содержится в:
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user