permalink button
This commit is contained in:
parent
19cb06d040
commit
d4a36f5081
1 changed files with 15 additions and 0 deletions
|
@ -62,12 +62,17 @@ module.exports = React.createClass({
|
||||||
if (this.props.onFinished) this.props.onFinished();
|
if (this.props.onFinished) this.props.onFinished();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onPermalinkClick: function() {
|
||||||
|
if (this.props.onFinished) this.props.onFinished();
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var eventStatus = this.props.mxEvent.status;
|
var eventStatus = this.props.mxEvent.status;
|
||||||
var resendButton;
|
var resendButton;
|
||||||
var viewSourceButton;
|
var viewSourceButton;
|
||||||
var redactButton;
|
var redactButton;
|
||||||
var cancelButton;
|
var cancelButton;
|
||||||
|
var permalinkButton;
|
||||||
|
|
||||||
if (eventStatus === 'not_sent') {
|
if (eventStatus === 'not_sent') {
|
||||||
resendButton = (
|
resendButton = (
|
||||||
|
@ -99,12 +104,22 @@ module.exports = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// XXX: this should be https://matrix.to.
|
||||||
|
// XXX: if we use room ID, we should also include a server where the event can be found (other than in the domain of the event ID)
|
||||||
|
permalinkButton = (
|
||||||
|
<div className="mx_ContextualMenu_field">
|
||||||
|
<a href={ "#/room/" + this.props.mxEvent.getRoomId() +"/"+ this.props.mxEvent.getId() }
|
||||||
|
onClick={ this.onPermalinkClick }>Permalink</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{resendButton}
|
{resendButton}
|
||||||
{redactButton}
|
{redactButton}
|
||||||
{cancelButton}
|
{cancelButton}
|
||||||
{viewSourceButton}
|
{viewSourceButton}
|
||||||
|
{permalinkButton}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue