diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 4bb81a2e53..788940fe0e 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -298,6 +298,16 @@ limitations under the License. cursor: pointer; } +.mx_EventTile_e2eIcon_hidden { + display: none; +} + +/* always override hidden attribute for blocked and warning */ +.mx_EventTile_e2eIcon_hidden[src="img/e2e-blocked.svg"], +.mx_EventTile_e2eIcon_hidden[src="img/e2e-warning.svg"] { + display: block; +} + .mx_EventTile_keyRequestInfo { font-size: 12px; } diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 44e2f93d63..3bef4e41bb 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -63,6 +63,7 @@ const gHVersionLabel = function(repo, token='') { const SIMPLE_SETTINGS = [ { id: "urlPreviewsEnabled" }, { id: "autoplayGifsAndVideos" }, + { id: "alwaysShowEncryptionIcons" }, { id: "hideReadReceipts" }, { id: "dontSendTypingNotifications" }, { id: "alwaysShowTimestamps" }, diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index ed7851bf2d..84acfb160e 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -31,6 +31,7 @@ import withMatrixClient from '../../../wrappers/withMatrixClient'; const ContextualMenu = require('../../structures/ContextualMenu'); import dis from '../../../dispatcher'; import {makeEventPermalink} from "../../../matrix-to"; +import SettingsStore from "../../../settings/SettingsStore"; const ObjectUtils = require('../../../ObjectUtils'); @@ -742,7 +743,11 @@ function E2ePadlockUnencrypted(props) { } function E2ePadlock(props) { - return ; + if (SettingsStore.getValue("alwaysShowEncryptionIcons")) { + return ; + } else { + return ; + } } module.exports.getHandlerTile = getHandlerTile; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index daf0ce605d..5b02fd1866 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -201,6 +201,7 @@ "Show timestamps in 12 hour format (e.g. 2:30pm)": "Show timestamps in 12 hour format (e.g. 2:30pm)", "Always show message timestamps": "Always show message timestamps", "Autoplay GIFs and videos": "Autoplay GIFs and videos", + "Always show encryption icons": "Always show encryption icons", "Enable automatic language detection for syntax highlighting": "Enable automatic language detection for syntax highlighting", "Hide avatars in user and room mentions": "Hide avatars in user and room mentions", "Disable big emoji in chat": "Disable big emoji in chat", diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 8e94be3be1..d214d5417f 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -150,6 +150,11 @@ export const SETTINGS = { displayName: _td('Autoplay GIFs and videos'), default: false, }, + "alwaysShowEncryptionIcons": { + supportedLevels: LEVELS_ACCOUNT_SETTINGS, + displayName: _td('Always show encryption icons'), + default: true, + }, "enableSyntaxHighlightLanguageDetection": { supportedLevels: LEVELS_ACCOUNT_SETTINGS, displayName: _td('Enable automatic language detection for syntax highlighting'),