From a3d4ed5aee53942561d49350c783e3d9a2597cfd Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 15 Nov 2016 12:31:17 +0000 Subject: [PATCH] Show an open padlock for unencrypted rooms Also, add a tooltip, and enlarge the img to 12px wide, because the open padlock looked silly at 10px and they both look fine at 12px --- src/components/views/rooms/MessageComposer.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index e78cf0b13e..ee9c49d52a 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -222,13 +222,22 @@ export default class MessageComposer extends React.Component { ); + let e2eimg, e2etitle; + if (MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId)) { // FIXME: show a /!\ if there are untrusted devices in the room... - controls.push( - Encrypted room - ); + e2eimg = 'img/e2e-verified.svg'; + e2etitle = 'Encrypted room'; + } else { + e2eimg = 'img/e2e-unencrypted.svg'; + e2etitle = 'Unencrypted room'; } + controls.push( + {e2etitle} + ); var callButton, videoCallButton, hangupButton; if (this.props.callState && this.props.callState !== 'ended') { hangupButton =