mirror of https://github.com/vector-im/riot-web
Merge remote-tracking branch 'origin/develop' into dbkr/add_msisdn
commit
4326d7a182
|
@ -417,7 +417,7 @@ var RoomSubList = React.createClass({
|
||||||
if (this.props.incomingCall) {
|
if (this.props.incomingCall) {
|
||||||
var self = this;
|
var self = this;
|
||||||
// Check if the incoming call is for this section
|
// Check if the incoming call is for this section
|
||||||
var incomingCallRoom = this.state.sortedList.filter(function(room) {
|
var incomingCallRoom = this.props.list.filter(function(room) {
|
||||||
return self.props.incomingCall.roomId === room.roomId;
|
return self.props.incomingCall.roomId === room.roomId;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ var RoomSubList = React.createClass({
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
console.error("Failed to add tag " + self.props.tagName + " to room" + err);
|
console.error("Failed to add tag " + self.props.tagName + " to room" + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Error",
|
title: "Error",
|
||||||
description: "Failed to add tag " + self.props.tagName + " to room",
|
description: "Failed to add tag " + self.props.tagName + " to room",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -62,19 +62,24 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onRedactClick: function() {
|
onRedactClick: function() {
|
||||||
MatrixClientPeg.get().redactEvent(
|
const ConfirmRedactDialog = sdk.getComponent("dialogs.ConfirmRedactDialog");
|
||||||
this.props.mxEvent.getRoomId(), this.props.mxEvent.getId()
|
Modal.createDialog(ConfirmRedactDialog, {
|
||||||
).done(function() {
|
onFinished: (proceed) => {
|
||||||
// message should disappear by itself
|
if (!proceed) return;
|
||||||
}, function(e) {
|
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
MatrixClientPeg.get().redactEvent(
|
||||||
// display error message stating you couldn't delete this.
|
this.props.mxEvent.getRoomId(), this.props.mxEvent.getId()
|
||||||
var code = e.errcode || e.statusCode;
|
).catch(function(e) {
|
||||||
Modal.createDialog(ErrorDialog, {
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
title: "Error",
|
// display error message stating you couldn't delete this.
|
||||||
description: "You cannot delete this message. (" + code + ")"
|
var code = e.errcode || e.statusCode;
|
||||||
});
|
Modal.createDialog(ErrorDialog, {
|
||||||
});
|
title: "Error",
|
||||||
|
description: "You cannot delete this message. (" + code + ")"
|
||||||
|
});
|
||||||
|
}).done();
|
||||||
|
},
|
||||||
|
}, 'mx_Dialog_confirmredact');
|
||||||
if (this.props.onFinished) this.props.onFinished();
|
if (this.props.onFinished) this.props.onFinished();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -121,7 +126,7 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eventStatus) { // sent
|
if (!eventStatus && !this.props.mxEvent.isRedacted()) { // sent and not redacted
|
||||||
redactButton = (
|
redactButton = (
|
||||||
<div className="mx_MessageContextMenu_field" onClick={this.onRedactClick}>
|
<div className="mx_MessageContextMenu_field" onClick={this.onRedactClick}>
|
||||||
Redact
|
Redact
|
||||||
|
|
|
@ -24,7 +24,7 @@ import sdk from 'matrix-react-sdk';
|
||||||
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
|
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
|
||||||
import dis from 'matrix-react-sdk/lib/dispatcher';
|
import dis from 'matrix-react-sdk/lib/dispatcher';
|
||||||
import DMRoomMap from 'matrix-react-sdk/lib/utils/DMRoomMap';
|
import DMRoomMap from 'matrix-react-sdk/lib/utils/DMRoomMap';
|
||||||
import Rooms from 'matrix-react-sdk/lib/Rooms';
|
import * as Rooms from 'matrix-react-sdk/lib/Rooms';
|
||||||
import * as RoomNotifs from 'matrix-react-sdk/lib/RoomNotifs';
|
import * as RoomNotifs from 'matrix-react-sdk/lib/RoomNotifs';
|
||||||
import Modal from 'matrix-react-sdk/lib/Modal';
|
import Modal from 'matrix-react-sdk/lib/Modal';
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,8 @@ var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
||||||
var DateUtils = require('matrix-react-sdk/lib/DateUtils');
|
var DateUtils = require('matrix-react-sdk/lib/DateUtils');
|
||||||
var filesize = require('filesize');
|
var filesize = require('filesize');
|
||||||
var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton');
|
var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton');
|
||||||
|
const Modal = require('matrix-react-sdk/lib/Modal');
|
||||||
|
const sdk = require('matrix-react-sdk');
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'ImageView',
|
displayName: 'ImageView',
|
||||||
|
@ -62,19 +64,23 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onRedactClick: function() {
|
onRedactClick: function() {
|
||||||
var self = this;
|
const ConfirmRedactDialog = sdk.getComponent("dialogs.ConfirmRedactDialog");
|
||||||
MatrixClientPeg.get().redactEvent(
|
Modal.createDialog(ConfirmRedactDialog, {
|
||||||
this.props.mxEvent.getRoomId(), this.props.mxEvent.getId()
|
onFinished: (proceed) => {
|
||||||
).done(function() {
|
if (!proceed) return;
|
||||||
if (self.props.onFinished) self.props.onFinished();
|
var self = this;
|
||||||
}, function(e) {
|
MatrixClientPeg.get().redactEvent(
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
this.props.mxEvent.getRoomId(), this.props.mxEvent.getId()
|
||||||
// display error message stating you couldn't delete this.
|
).catch(function(e) {
|
||||||
var code = e.errcode || e.statusCode;
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
Modal.createDialog(ErrorDialog, {
|
// display error message stating you couldn't delete this.
|
||||||
title: "Error",
|
var code = e.errcode || e.statusCode;
|
||||||
description: "You cannot delete this image. (" + code + ")"
|
Modal.createDialog(ErrorDialog, {
|
||||||
});
|
title: "Error",
|
||||||
|
description: "You cannot delete this image. (" + code + ")"
|
||||||
|
});
|
||||||
|
}).done();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -130,14 +130,13 @@ limitations under the License.
|
||||||
color: $event-notsent-color;
|
color: $event-notsent-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_EventTile_redacted {
|
.mx_EventTile_redacted .mx_EventTile_line .mx_UnknownBody {
|
||||||
padding-top: 0px;
|
display: block;
|
||||||
}
|
width: 100%;
|
||||||
|
max-width: 300px;
|
||||||
.mx_EventTile_redacted .mx_EventTile_line,
|
height: 24px;
|
||||||
.mx_EventTile_redacted:hover .mx_EventTile_line,
|
border-radius: 4px;
|
||||||
.mx_EventTile_redacted.menu .mx_EventTile_line {
|
background-color: black;
|
||||||
background-color: $primary-fg-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_EventTile_highlight,
|
.mx_EventTile_highlight,
|
||||||
|
|
Loading…
Reference in New Issue