@@ -19,6 +19,7 @@ import {
1919import { type Optional } from "matrix-events-sdk" ;
2020import { Tooltip } from "@vector-im/compound-web" ;
2121import { logger } from "matrix-js-sdk/src/logger" ;
22+ import LockOffIcon from "@vector-im/compound-design-tokens/assets/web/icons/lock-off" ;
2223
2324import { _t } from "../../../languageHandler" ;
2425import { MatrixClientPeg } from "../../../MatrixClientPeg" ;
@@ -525,12 +526,25 @@ export class MessageComposer extends React.Component<IProps, IState> {
525526 } ;
526527
527528 public render ( ) : React . ReactNode {
528- const hasE2EIcon = Boolean ( ! this . state . isWysiwygLabEnabled && this . props . e2eStatus === E2EStatus . Warning ) ;
529- const e2eIcon = hasE2EIcon && (
530- < div className = "mx_MessageComposer_e2eIconWrapper" >
531- < E2EIcon key = "e2eIcon" status = { this . props . e2eStatus ! } className = "mx_MessageComposer_e2eIcon" />
532- </ div >
533- ) ;
529+ const isUnencrypted = ! this . props . e2eStatus ;
530+ const encryptionWarning = this . props . e2eStatus === E2EStatus . Verified ;
531+ const hasE2EIcon = Boolean ( ! this . state . isWysiwygLabEnabled && ( encryptionWarning || isUnencrypted ) ) ;
532+
533+ let e2eIcon : ReactNode ;
534+ if ( hasE2EIcon ) {
535+ e2eIcon = encryptionWarning ? (
536+ < div className = "mx_MessageComposer_e2eIconWrapper" >
537+ < E2EIcon key = "e2eIcon" status = { this . props . e2eStatus ! } className = "mx_MessageComposer_e2eIcon" />
538+ </ div >
539+ ) : (
540+ < LockOffIcon
541+ className = "mx_MessageComposer_e2eIcon-new"
542+ width = "12"
543+ height = "12"
544+ color = "var(--cpd-color-icon-info-primary)"
545+ />
546+ ) ;
547+ }
534548
535549 const controls : ReactNode [ ] = [ ] ;
536550 const menuPosition = this . getMenuPosition ( ) ;
0 commit comments