mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
Honour the is_privileged flag in GroupView
This commit is contained in:
parent
3f0ee4e6ad
commit
3c2e6fdf9e
2 changed files with 16 additions and 9 deletions
|
@ -545,8 +545,12 @@ export default React.createClass({
|
|||
</div>
|
||||
</div>;
|
||||
} else if (group.myMembership === 'join') {
|
||||
let youAreAMemberText = _t("You are a member of this group");
|
||||
if (this.state.summary.user && this.state.summary.user.is_privileged) {
|
||||
youAreAMemberText = _t("You are an administrator of this group");
|
||||
}
|
||||
return <div className="mx_GroupView_invitedSection">
|
||||
{_t("You are a member of this group")}
|
||||
{youAreAMemberText}
|
||||
<div className="mx_GroupView_membership_buttonContainer">
|
||||
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
||||
onClick={this._onLeaveClick}
|
||||
|
@ -667,13 +671,15 @@ export default React.createClass({
|
|||
{this._getFeaturedRoomsNode()}
|
||||
{this._getFeaturedUsersNode()}
|
||||
</div>;
|
||||
rightButtons.push(
|
||||
<AccessibleButton className="mx_GroupHeader_button"
|
||||
onClick={this._onEditClick} title={_t("Edit Group")} key="_editButton"
|
||||
>
|
||||
<TintableSvg src="img/icons-settings-room.svg" width="16" height="16"/>
|
||||
</AccessibleButton>,
|
||||
);
|
||||
if (summary.user && summary.user.is_privileged) {
|
||||
rightButtons.push(
|
||||
<AccessibleButton className="mx_GroupHeader_button"
|
||||
onClick={this._onEditClick} title={_t("Edit Group")} key="_editButton"
|
||||
>
|
||||
<TintableSvg src="img/icons-settings-room.svg" width="16" height="16"/>
|
||||
</AccessibleButton>,
|
||||
);
|
||||
}
|
||||
if (this.props.collapsedRhs) {
|
||||
rightButtons.push(
|
||||
<AccessibleButton className="mx_GroupHeader_button"
|
||||
|
|
|
@ -892,5 +892,6 @@
|
|||
"Add users to the group summary": "Add users to the group summary",
|
||||
"Who would you like to add to this summary?": "Who would you like to add to this summary?",
|
||||
"Add to summary": "Add to summary",
|
||||
"Failed to add the following users to the summary of %(groupId)s:": "Failed to add the following users to the summary of %(groupId)s:"
|
||||
"Failed to add the following users to the summary of %(groupId)s:": "Failed to add the following users to the summary of %(groupId)s:",
|
||||
"You are an administrator of this group": "You are an administrator of this group"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue