diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss
index fb85b9cf88..43aed34a23 100644
--- a/res/css/views/rooms/_EventTile.scss
+++ b/res/css/views/rooms/_EventTile.scss
@@ -347,27 +347,28 @@ div.mx_EventTile_notSent.mx_EventTile_redacted .mx_UnknownBody {
}
.mx_EventTile_e2eIcon {
- display: block;
position: absolute;
- top: 8px;
+ top: 6px;
left: 46px;
width: 15px;
height: 15px;
cursor: pointer;
- mask-size: 14px;
- mask-repeat: no-repeat;
- mask-position: 0;
+ display: block;
+ bottom: 0;
+ right: 0;
opacity: 0.2;
+ background-repeat: no-repeat;
+ background-size: contain;
}
.mx_EventTile_e2eIcon_undecryptable, .mx_EventTile_e2eIcon_unverified {
- mask-image: url('$(res)/img/e2e/warning.svg');
- background-color: $warning-color;
+ background-image: url('$(res)/img/e2e/warning.svg');
+ opacity: 1;
}
.mx_EventTile_e2eIcon_unencrypted {
- mask-image: url('$(res)/img/e2e/warning.svg');
- background-color: $composer-e2e-icon-color;
+ background-image: url('$(res)/img/e2e/warning.svg');
+ opacity: 1;
}
.mx_EventTile_e2eIcon_hidden {
diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js
index 8b0e62d8f5..efda6c6d44 100644
--- a/src/components/views/rooms/EventTile.js
+++ b/src/components/views/rooms/EventTile.js
@@ -494,6 +494,9 @@ module.exports = createReactClass({
if (ev.status === EventStatus.NOT_SENT) {
return;
}
+ if (ev.isState()) {
+ return; // we expect this to be unencrypted
+ }
// if the event is not encrypted, but it's an e2e room, show the open padlock
return ;
}
@@ -887,7 +890,7 @@ module.exports.haveTileForEvent = function(e) {
function E2ePadlockUndecryptable(props) {
return (
-
+
);
}
@@ -899,19 +902,62 @@ function E2ePadlockUnverified(props) {
function E2ePadlockUnencrypted(props) {
return (
-
+
);
}
-function E2ePadlock(props) {
- if (SettingsStore.getValue("alwaysShowEncryptionIcons")) {
- return (
);
- } else {
- return ();
+class E2ePadlock extends React.Component {
+ static propTypes = {
+ icon: PropTypes.string.isRequired,
+ title: PropTypes.string.isRequired,
+ onClick: PropTypes.func,
+ };
+
+ constructor() {
+ super();
+
+ this.state = {
+ hover: false,
+ };
+ }
+
+ onClick = (e) => {
+ if (this.props.onClick) this.props.onClick(e);
+ };
+
+ onHoverStart = () => {
+ this.setState({hover: true});
+ };
+
+ onHoverEnd = () => {
+ this.setState({hover: false});
+ };
+
+ render() {
+ let tooltip = null;
+ if (this.state.hover) {
+ const Tooltip = sdk.getComponent("elements.Tooltip");
+ tooltip = ;
+ }
+ if (SettingsStore.getValue("alwaysShowEncryptionIcons")) {
+ return (
+ {tooltip}
+ );
+ } else {
+ return (
+ {tooltip}
+ );
+ }
}
}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index bacd15a275..9536ac569b 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -834,9 +834,9 @@
"If your other devices do not have the key for this message you will not be able to decrypt them.": "If your other devices do not have the key for this message you will not be able to decrypt them.",
"Key request sent.": "Key request sent.",
"Re-request encryption keys from your other devices.": "Re-request encryption keys from your other devices.",
- "Undecryptable": "Undecryptable",
+ "This message cannot be decrypted": "This message cannot be decrypted",
"Encrypted by an unverified device": "Encrypted by an unverified device",
- "Unencrypted message": "Unencrypted message",
+ "Unencrypted": "Unencrypted",
"Please select the destination room for this message": "Please select the destination room for this message",
"Scroll to bottom of page": "Scroll to bottom of page",
"device id: ": "device id: ",