You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	Merge pull request #1845 from kethinov/hide_encryption_icons
Hide inline encryption icons except when hovering over a message
This commit is contained in:
		@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -63,6 +63,7 @@ const gHVersionLabel = function(repo, token='') {
 | 
			
		||||
const SIMPLE_SETTINGS = [
 | 
			
		||||
    { id: "urlPreviewsEnabled" },
 | 
			
		||||
    { id: "autoplayGifsAndVideos" },
 | 
			
		||||
    { id: "alwaysShowEncryptionIcons" },
 | 
			
		||||
    { id: "hideReadReceipts" },
 | 
			
		||||
    { id: "dontSendTypingNotifications" },
 | 
			
		||||
    { id: "alwaysShowTimestamps" },
 | 
			
		||||
 
 | 
			
		||||
@@ -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 <img className="mx_EventTile_e2eIcon" {...props} />;
 | 
			
		||||
    if (SettingsStore.getValue("alwaysShowEncryptionIcons")) {
 | 
			
		||||
        return <img className="mx_EventTile_e2eIcon" {...props} />;
 | 
			
		||||
    } else {
 | 
			
		||||
        return <img className="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_hidden" {...props} />;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports.getHandlerTile = getHandlerTile;
 | 
			
		||||
 
 | 
			
		||||
@@ -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",
 | 
			
		||||
 
 | 
			
		||||
@@ -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'),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user