diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index d1622e5f41..1adc31649e 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -69,45 +69,21 @@ module.exports = React.createClass({ }, onMemberListButtonClick: function() { - if (this.props.collapsed || this.state.phase !== this.Phase.MemberList) { - this.setState({ phase: this.Phase.MemberList }); - dis.dispatch({ - action: 'show_right_panel', - }); - } - else { - dis.dispatch({ - action: 'hide_right_panel', - }); - } + this.setState({ phase: this.Phase.MemberList }); }, onFileListButtonClick: function() { - if (this.props.collapsed || this.state.phase !== this.Phase.FilePanel) { - this.setState({ phase: this.Phase.FilePanel }); - dis.dispatch({ - action: 'show_right_panel', - }); - } - else { - dis.dispatch({ - action: 'hide_right_panel', - }); - } + this.setState({ phase: this.Phase.FilePanel }); }, onNotificationListButtonClick: function() { - if (this.props.collapsed || this.state.phase !== this.Phase.NotificationPanel) { - this.setState({ phase: this.Phase.NotificationPanel }); - dis.dispatch({ - action: 'show_right_panel', - }); - } - else { - dis.dispatch({ - action: 'hide_right_panel', - }); - } + this.setState({ phase: this.Phase.NotificationPanel }); + }, + + onCollapseClick: function() { + dis.dispatch({ + action: 'hide_right_panel', + }); }, onInviteButtonClick: function() { @@ -235,6 +211,9 @@ module.exports = React.createClass({ { notificationsHighlight } +
+ +
; } diff --git a/src/components/structures/SearchBox.js b/src/components/structures/SearchBox.js index 7fc5100049..20181f75b4 100644 --- a/src/components/structures/SearchBox.js +++ b/src/components/structures/SearchBox.js @@ -68,13 +68,13 @@ module.exports = React.createClass({ if (this.props.collapsed) { toggleCollapse =
- +
} else { toggleCollapse =
- +
} diff --git a/src/skins/vector/css/vector-web/structures/_RightPanel.scss b/src/skins/vector/css/vector-web/structures/_RightPanel.scss index 91034e633d..c0872e82d7 100644 --- a/src/skins/vector/css/vector-web/structures/_RightPanel.scss +++ b/src/skins/vector/css/vector-web/structures/_RightPanel.scss @@ -34,14 +34,15 @@ limitations under the License. .mx_RightPanel_headerButtonGroup { margin-top: 6px; - float: left; + display: flex; + width: 100%; background-color: $primary-bg-color; margin-left: 0px; } .mx_RightPanel_headerButton { cursor: pointer; - display: table-cell; + flex: 0; vertical-align: top; padding-left: 4px; padding-right: 5px; @@ -69,6 +70,12 @@ limitations under the License. padding-bottom: 2px; } +.mx_RightPanel_collapsebutton { + flex: 1; + text-align: right; + margin-top: 20px; +} + .mx_RightPanel .mx_MemberList, .mx_RightPanel .mx_MemberInfo, .mx_RightPanel_blank {