diff --git a/res/css/views/rooms/_RoomHeader.scss b/res/css/views/rooms/_RoomHeader.scss index f1e4456cc1..45b9733faa 100644 --- a/res/css/views/rooms/_RoomHeader.scss +++ b/res/css/views/rooms/_RoomHeader.scss @@ -263,3 +263,24 @@ limitations under the License. .mx_RoomHeader_pinsIndicatorUnread { background-color: $pinned-unread-color; } + +.mx_RoomHeader_PrivateIcon.mx_RoomHeader_isPrivate { + width: 12px; + height: 12px; + position: relative; + display: block !important; + + &::before { + background-color: $roomtile-name-color; + mask-image: url('$(res)/img/feather-customised/lock-solid.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/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index eaf2e733ca..6807cc98a8 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -159,6 +159,14 @@ module.exports = createReactClass({ : undefined; + const joinRules = this.props.room && this.props.room.currentState.getStateEvents("m.room.join_rules", ""); + const joinRule = joinRules && joinRules.getContent().join_rule; + const joinRuleClass = classNames("mx_RoomHeader_PrivateIcon", + {"mx_RoomHeader_isPrivate": joinRule === "invite"}); + const privateIcon = SettingsStore.isFeatureEnabled("feature_cross_signing") ? +
: + undefined; + if (this.props.onCancelClick) { cancelButton = ; } @@ -303,6 +311,7 @@ module.exports = createReactClass({
{ roomAvatar }
{ e2eIcon } + { privateIcon } { name } { topicElement } { cancelButton }