Place RoomHeader privacy padlocks behind the crosssigning feature flag

This commit is contained in:
Zoe 2020-01-14 10:31:01 +00:00
parent 397637d59d
commit f617fb7bbe

View file

@ -163,6 +163,9 @@ module.exports = createReactClass({
const joinRule = joinRules && joinRules.getContent().join_rule; const joinRule = joinRules && joinRules.getContent().join_rule;
const joinRuleClass = classNames("mx_RoomHeader_PrivateIcon", const joinRuleClass = classNames("mx_RoomHeader_PrivateIcon",
{"mx_RoomHeader_isPrivate": joinRule === "invite"}); {"mx_RoomHeader_isPrivate": joinRule === "invite"});
const privateIcon = SettingsStore.isFeatureEnabled("feature_cross_signing") ?
<div className={joinRuleClass} /> :
undefined;
if (this.props.onCancelClick) { if (this.props.onCancelClick) {
cancelButton = <CancelButton onClick={this.props.onCancelClick} />; cancelButton = <CancelButton onClick={this.props.onCancelClick} />;
@ -308,7 +311,7 @@ module.exports = createReactClass({
<div className="mx_RoomHeader_wrapper"> <div className="mx_RoomHeader_wrapper">
<div className="mx_RoomHeader_avatar">{ roomAvatar }</div> <div className="mx_RoomHeader_avatar">{ roomAvatar }</div>
{ e2eIcon } { e2eIcon }
<div className={joinRuleClass} /> { privateIcon }
{ name } { name }
{ topicElement } { topicElement }
{ cancelButton } { cancelButton }