diff --git a/res/css/views/rooms/_RoomTile.scss b/res/css/views/rooms/_RoomTile.scss index e5c7948216..ae38045712 100644 --- a/res/css/views/rooms/_RoomTile.scss +++ b/res/css/views/rooms/_RoomTile.scss @@ -200,3 +200,31 @@ limitations under the License. .mx_GroupInviteTile .mx_RoomTile_name { flex: 1; } + +.mx_RoomTile.mx_RoomTile.mx_RoomTile_isEncrypted .mx_RoomTile_name { + // Scoot the padding in a bit from 6px to make it look better + padding-left: 3px; +} + +.mx_RoomTile.mx_RoomTile_isEncrypted .mx_RoomTile_E2EIcon { + width: 12px; + height: 12px; + position: relative; + display: block !important; + // Align the padlock with unencrypted room names + margin-left: 6px; + + &::before { + background-color: $roomtile-name-color; + mask-image: url('$(res)/img/lock.svg'); + mask-position: center; + mask-repeat: no-repeat; + mask-size: contain; + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + } +} diff --git a/res/img/lock.svg b/res/img/lock.svg new file mode 100644 index 0000000000..9eb8b6a4c5 --- /dev/null +++ b/res/img/lock.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 241713c97d..b9e1abd23d 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -303,6 +303,7 @@ module.exports = createReactClass({ 'mx_RoomTile_noBadges': !badges, 'mx_RoomTile_transparent': this.props.transparent, 'mx_RoomTile_hasSubtext': subtext && !this.props.collapsed, + 'mx_RoomTile_isEncrypted': MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId), }); const avatarClasses = classNames({ @@ -428,6 +429,7 @@ module.exports = createReactClass({ { dmIndicator } +
{ label }