From eb6a4f97babe92e0f9c70900bea6b3da004ed32e Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 13 Sep 2016 19:00:35 +0100 Subject: [PATCH] make it work --- src/components/structures/RoomView.js | 7 +++++- src/components/views/rooms/RoomHeader.js | 6 ++--- .../views/rooms/SimpleRoomHeader.js | 22 +++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 9c0c0080fa..6e92e9e834 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1398,7 +1398,11 @@ module.exports = React.createClass({ // We have a regular invite for this room. return (
- +
+
} diff --git a/src/components/views/rooms/SimpleRoomHeader.js b/src/components/views/rooms/SimpleRoomHeader.js index 2f8c5eaf11..7f2bb0048a 100644 --- a/src/components/views/rooms/SimpleRoomHeader.js +++ b/src/components/views/rooms/SimpleRoomHeader.js @@ -17,6 +17,8 @@ limitations under the License. 'use strict'; var React = require('react'); +var sdk = require('../../../index'); +var dis = require("../../../dispatcher"); /* * A stripped-down room header used for things like the user settings @@ -28,19 +30,39 @@ module.exports = React.createClass({ propTypes: { title: React.PropTypes.string, onCancelClick: React.PropTypes.func, + + // is the RightPanel collapsed? + collapsedRhs: React.PropTypes.bool, + }, + + onShowRhsClick: function(ev) { + dis.dispatch({ action: 'show_right_panel' }); }, render: function() { + var TintableSvg = sdk.getComponent("elements.TintableSvg"); + var cancelButton; if (this.props.onCancelClick) { cancelButton =
Cancel
} + var showRhsButton; + /* // don't bother cluttering things up with this for now. + if (this.props.collapsedRhs) { + showRhsButton = +
+ +
+ } + */ + return (
{ this.props.title } + { showRhsButton } { cancelButton }