mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
support resending redaction in context menu
This commit is contained in:
parent
6d458154a9
commit
d66d3ca4d2
@ -95,6 +95,11 @@ module.exports = React.createClass({
|
||||
this.closeMenu();
|
||||
},
|
||||
|
||||
onResendRedactionClick: function() {
|
||||
Resend.resend(this.props.mxEvent.localRedactionEvent());
|
||||
this.closeMenu();
|
||||
},
|
||||
|
||||
e2eInfoClicked: function() {
|
||||
this.props.e2eInfoCallback();
|
||||
this.closeMenu();
|
||||
@ -225,8 +230,8 @@ module.exports = React.createClass({
|
||||
render: function() {
|
||||
const mxEvent = this.props.mxEvent;
|
||||
const eventStatus = mxEvent.status;
|
||||
const editEvent = mxEvent.replacingEvent();
|
||||
const editStatus = editEvent && editEvent.status;
|
||||
const editStatus = mxEvent.replacingEvent() && mxEvent.replacingEvent().status;
|
||||
const redactStatus = mxEvent.localRedactionEvent() && mxEvent.localRedactionEvent().status;
|
||||
let resendButton;
|
||||
let redactButton;
|
||||
let cancelButton;
|
||||
@ -257,6 +262,14 @@ module.exports = React.createClass({
|
||||
);
|
||||
}
|
||||
|
||||
if (redactStatus === EventStatus.NOT_SENT) {
|
||||
resendButton = (
|
||||
<div className="mx_MessageContextMenu_field" onClick={this.onResendRedactionClick}>
|
||||
{ _t('Resend removal') }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (isSent && this.state.canRedact) {
|
||||
redactButton = (
|
||||
<div className="mx_MessageContextMenu_field" onClick={this.onRedactClick}>
|
||||
|
@ -1303,6 +1303,7 @@
|
||||
"You cannot delete this message. (%(code)s)": "You cannot delete this message. (%(code)s)",
|
||||
"Resend": "Resend",
|
||||
"Resend edit": "Resend edit",
|
||||
"Resend removal": "Resend removal",
|
||||
"Cancel Sending": "Cancel Sending",
|
||||
"Forward Message": "Forward Message",
|
||||
"Pin Message": "Pin Message",
|
||||
|
Loading…
Reference in New Issue
Block a user