diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 18adcda6..acd92e3f 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -98,11 +98,15 @@ module.exports = React.createClass({ return; } - // call ChatInviteDialog - dis.dispatch({ - action: 'view_invite', - roomId: this.props.roomId, - }); + if (this.state.phase === this.Phase.GroupMemberList) { + // TODO: display UserPickeDialog + } else { + // call UserPickerDialog + dis.dispatch({ + action: 'view_invite', + roomId: this.props.roomId, + }); + } }, onRoomStateMember: function(ev, state, member) { @@ -169,7 +173,6 @@ module.exports = React.createClass({ const NotificationPanel = sdk.getComponent('structures.NotificationPanel'); const FilePanel = sdk.getComponent('structures.FilePanel'); const TintableSvg = sdk.getComponent("elements.TintableSvg"); - let buttonGroup; let inviteGroup; let panel; @@ -212,50 +215,72 @@ module.exports = React.createClass({ } + let headerButtons = []; if (this.props.roomId) { - buttonGroup = -
- -
{ membersBadge ? membersBadge :  }
- - { membersHighlight } -
- -
 
- - { filesHighlight } -
- -
 
- - { notificationsHighlight } -
-
- -
-
; + headerButtons.push( + +
{ membersBadge ? membersBadge :  }
+ + { membersHighlight } +
+ ); + headerButtons.push( + +
 
+ + { filesHighlight } +
+ ); + headerButtons.push( + +
 
+ + { notificationsHighlight } +
+ ); + } + + if (this.props.roomId || this.props.groupId) { + // Hiding the right panel hides it completely and relies on an 'expand' button + // being put in the RoomHeader or GroupView header, so only show the minimise + // button on these 2 screens or you won't be able to re-expand the panel. + headerButtons.push( +
+ +
+ ); } if (!this.props.collapsed) { if (this.props.roomId && this.state.phase == this.Phase.RoomMemberList) { panel = } else if (this.props.groupId && this.state.phase == this.Phase.GroupMemberList) { - panel = + panel = ; + inviteGroup = ( + +
+ +
+
{ _t('Invite to this group') }
+
+ ); } else if (this.state.phase == this.Phase.RoomMemberInfo) { const MemberInfo = sdk.getComponent('rooms.MemberInfo'); panel = } else if (this.state.phase == this.Phase.GroupMemberInfo) { const GroupMemberInfo = sdk.getComponent('groups.GroupMemberInfo'); - panel = + panel = ; } else if (this.state.phase == this.Phase.NotificationPanel) { - panel = + panel = ; } else if (this.state.phase == this.Phase.FilePanel) { - panel = + panel = ; } } @@ -271,7 +296,9 @@ module.exports = React.createClass({ return (