mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Merge pull request #3948 from matrix-org/foldleft/12035-room-decoration-design-pass-2
Remove DM icons if `feature_cross_signing` is enabled; hide padlocks in DM room headers
This commit is contained in:
commit
0eb49c4c72
3 changed files with 8 additions and 4 deletions
|
@ -363,7 +363,7 @@ export default class RoomBreadcrumbs extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
let dmIndicator;
|
let dmIndicator;
|
||||||
if (this._isDmRoom(r.room)) {
|
if (this._isDmRoom(r.room) && !SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||||
dmIndicator = <img
|
dmIndicator = <img
|
||||||
src={require("../../../../res/img/icon_person.svg")}
|
src={require("../../../../res/img/icon_person.svg")}
|
||||||
className="mx_RoomBreadcrumbs_dmIndicator"
|
className="mx_RoomBreadcrumbs_dmIndicator"
|
||||||
|
|
|
@ -31,6 +31,7 @@ import ManageIntegsButton from '../elements/ManageIntegsButton';
|
||||||
import {CancelButton} from './SimpleRoomHeader';
|
import {CancelButton} from './SimpleRoomHeader';
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import RoomHeaderButtons from '../right_panel/RoomHeaderButtons';
|
import RoomHeaderButtons from '../right_panel/RoomHeaderButtons';
|
||||||
|
import DMRoomMap from '../../../utils/DMRoomMap';
|
||||||
import E2EIcon from './E2EIcon';
|
import E2EIcon from './E2EIcon';
|
||||||
import InviteOnlyIcon from './InviteOnlyIcon';
|
import InviteOnlyIcon from './InviteOnlyIcon';
|
||||||
|
|
||||||
|
@ -161,10 +162,12 @@ export default createReactClass({
|
||||||
<E2EIcon status={this.props.e2eStatus} /> :
|
<E2EIcon status={this.props.e2eStatus} /> :
|
||||||
undefined;
|
undefined;
|
||||||
|
|
||||||
|
const dmUserId = DMRoomMap.shared().getUserIdForRoomId(this.props.room.roomId);
|
||||||
const joinRules = this.props.room && this.props.room.currentState.getStateEvents("m.room.join_rules", "");
|
const joinRules = this.props.room && this.props.room.currentState.getStateEvents("m.room.join_rules", "");
|
||||||
const joinRule = joinRules && joinRules.getContent().join_rule;
|
const joinRule = joinRules && joinRules.getContent().join_rule;
|
||||||
let privateIcon;
|
let privateIcon;
|
||||||
if (SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
// Don't show an invite-only icon for DMs. Users know they're invite-only.
|
||||||
|
if (!dmUserId && SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||||
if (joinRule == "invite") {
|
if (joinRule == "invite") {
|
||||||
privateIcon = <InviteOnlyIcon />;
|
privateIcon = <InviteOnlyIcon />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -478,8 +478,9 @@ export default createReactClass({
|
||||||
|
|
||||||
let dmIndicator;
|
let dmIndicator;
|
||||||
let dmOnline;
|
let dmOnline;
|
||||||
// If we can place a shield, do that instead
|
/* Post-cross-signing we don't show DM indicators at all, instead relying on user
|
||||||
if (dmUserId && !this.state.e2eStatus) {
|
context to let them know when that is. */
|
||||||
|
if (dmUserId && !SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||||
dmIndicator = <img
|
dmIndicator = <img
|
||||||
src={require("../../../../res/img/icon_person.svg")}
|
src={require("../../../../res/img/icon_person.svg")}
|
||||||
className="mx_RoomTile_dm"
|
className="mx_RoomTile_dm"
|
||||||
|
|
Loading…
Reference in a new issue