diff --git a/src/component-index.js b/src/component-index.js index 488b85670b..751332de1b 100644 --- a/src/component-index.js +++ b/src/component-index.js @@ -49,6 +49,7 @@ module.exports.components['views.create_room.Presets'] = require('./components/v module.exports.components['views.create_room.RoomAlias'] = require('./components/views/create_room/RoomAlias'); module.exports.components['views.dialogs.ChatInviteDialog'] = require('./components/views/dialogs/ChatInviteDialog'); module.exports.components['views.dialogs.DeactivateAccountDialog'] = require('./components/views/dialogs/DeactivateAccountDialog'); +module.exports.components['views.dialogs.EncryptedEventDialog'] = require('./components/views/dialogs/EncryptedEventDialog'); module.exports.components['views.dialogs.ErrorDialog'] = require('./components/views/dialogs/ErrorDialog'); module.exports.components['views.dialogs.LogoutPrompt'] = require('./components/views/dialogs/LogoutPrompt'); module.exports.components['views.dialogs.MultiInviteDialog'] = require('./components/views/dialogs/MultiInviteDialog'); diff --git a/src/components/views/dialogs/LogoutPrompt.js b/src/components/views/dialogs/LogoutPrompt.js index 7c4ba18e82..c4bd7a0474 100644 --- a/src/components/views/dialogs/LogoutPrompt.js +++ b/src/components/views/dialogs/LogoutPrompt.js @@ -18,6 +18,11 @@ var dis = require("../../../dispatcher"); module.exports = React.createClass({ displayName: 'LogoutPrompt', + + propTypes: { + onFinished: React.PropTypes.func, + }, + logOut: function() { dis.dispatch({action: 'logout'}); if (this.props.onFinished) { diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 6a266b2f13..44f2050c51 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -363,62 +363,11 @@ module.exports = React.createClass({ }, onCryptoClicked: function(e) { - var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); + var EncryptedEventDialog = sdk.getComponent("dialogs.EncryptedEventDialog"); var event = this.props.mxEvent; - // XXX: gutwrench - is there any reason not to expose this on MatrixClient itself? - var device = MatrixClientPeg.get()._crypto.getDeviceByIdentityKey( - event.getSender(), - event.getWireContent().algorithm, - event.getWireContent().sender_key - ); - - Modal.createDialog(ErrorDialog, { - title: "End-to-end encryption information", - description: ( -
Sent by | -{ event.getSender() } | -
Sender device name | -{ device.getDisplayName() } | -
Sender device ID | -{ device.deviceId } | -
Sender device verification: | -{ MatrixClientPeg.get().isEventSenderVerified(event) ? "verified" : NOT verified } | -
Sender device ed25519 fingerprint | -{ device.getFingerprint() } | -
Sender device curve25519 identity key | -{ event.getWireContent().sender_key } | -
Algorithm | -{ event.getWireContent().algorithm } | -
Decryption error | -{ event.getContent().body } | -