Merge pull request #557 from matrix-org/rav/show_padlock_on_unencrypted_room

Show an open padlock for unencrypted rooms
This commit is contained in:
David Baker 2016-11-16 13:03:52 +00:00 committed by GitHub
commit 218ced0276

View file

@ -222,13 +222,22 @@ export default class MessageComposer extends React.Component {
</div> </div>
); );
let e2eimg, e2etitle;
if (MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId)) { if (MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId)) {
// FIXME: show a /!\ if there are untrusted devices in the room... // FIXME: show a /!\ if there are untrusted devices in the room...
controls.push( e2eimg = 'img/e2e-verified.svg';
<img key="e2eIcon" className="mx_MessageComposer_e2eIcon" src="img/e2e-verified.svg" width="10" height="12" alt="Encrypted room"/> e2etitle = 'Encrypted room';
); } else {
e2eimg = 'img/e2e-unencrypted.svg';
e2etitle = 'Unencrypted room';
} }
controls.push(
<img key="e2eIcon" className="mx_MessageComposer_e2eIcon" src={e2eimg} width="12" height="12"
alt={e2etitle} title={e2etitle}
/>
);
var callButton, videoCallButton, hangupButton; var callButton, videoCallButton, hangupButton;
if (this.props.callState && this.props.callState !== 'ended') { if (this.props.callState && this.props.callState !== 'ended') {
hangupButton = hangupButton =