Redesign membership section in GroupView

pull/21833/head
Luke Barnard 2017-09-21 15:03:30 +01:00
parent 60d444b841
commit 16f5a667c6
1 changed files with 13 additions and 11 deletions

View File

@ -524,13 +524,15 @@ export default React.createClass({
const Spinner = sdk.getComponent("elements.Spinner"); const Spinner = sdk.getComponent("elements.Spinner");
if (this.state.membershipBusy) { if (this.state.membershipBusy) {
return <div className="mx_GroupView_invitedSection"> return <div className="mx_GroupView_membershipSection">
<Spinner /> <Spinner />
</div>; </div>;
} }
return <div className="mx_GroupView_invitedSection"> return <div className="mx_GroupView_membershipSection mx_GroupView_membershipSection_invited">
{_t("%(inviter)s has invited you to join this group", {inviter: group.inviter.userId})} <div className="mx_GroupView_membershipSection_description">
{_t("%(inviter)s has invited you to join this group", {inviter: group.inviter.userId})}
</div>
<div className="mx_GroupView_membership_buttonContainer"> <div className="mx_GroupView_membership_buttonContainer">
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton" <AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
onClick={this._onAcceptInviteClick} onClick={this._onAcceptInviteClick}
@ -545,15 +547,15 @@ export default React.createClass({
</div> </div>
</div>; </div>;
} else if (group.myMembership === 'join') { } else if (group.myMembership === 'join') {
return <div className="mx_GroupView_invitedSection"> return <div className="mx_GroupView_membershipSection mx_GroupView_membershipSection_joined">
{_t("You are a member of this group")} <div className="mx_GroupView_membershipSection_description">
<div className="mx_GroupView_membership_buttonContainer"> {_t("You are a member of this group")}
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
onClick={this._onLeaveClick}
>
{_t("Leave")}
</AccessibleButton>
</div> </div>
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
onClick={this._onLeaveClick}
>
{_t("Leave")}
</AccessibleButton>
</div>; </div>;
} }