From 70133ae661d3e9603c8390bbdd5d36a1db3a6d13 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 29 Mar 2016 12:51:46 +0100 Subject: [PATCH] Factor out SimpleRoomHeader Start cleaning up RoomHeader by factoring out a separate SimpleRoomHeader. --- src/component-index.js | 1 + src/components/structures/CreateRoom.js | 6 +- src/components/structures/UserSettings.js | 6 +- src/components/views/rooms/RoomHeader.js | 319 +++++++++--------- .../views/rooms/SimpleRoomHeader.js | 45 +++ 5 files changed, 206 insertions(+), 171 deletions(-) create mode 100644 src/components/views/rooms/SimpleRoomHeader.js diff --git a/src/component-index.js b/src/component-index.js index e15f0e917f..d11ee7711a 100644 --- a/src/component-index.js +++ b/src/component-index.js @@ -90,6 +90,7 @@ module.exports.components['views.rooms.RoomSettings'] = require('./components/vi module.exports.components['views.rooms.RoomTile'] = require('./components/views/rooms/RoomTile'); module.exports.components['views.rooms.SearchableEntityList'] = require('./components/views/rooms/SearchableEntityList'); module.exports.components['views.rooms.SearchResultTile'] = require('./components/views/rooms/SearchResultTile'); +module.exports.components['views.rooms.SimpleRoomHeader'] = require('./components/views/rooms/SimpleRoomHeader'); module.exports.components['views.rooms.TabCompleteBar'] = require('./components/views/rooms/TabCompleteBar'); module.exports.components['views.rooms.TopUnreadMessagesBar'] = require('./components/views/rooms/TopUnreadMessagesBar'); module.exports.components['views.rooms.UserTile'] = require('./components/views/rooms/UserTile'); diff --git a/src/components/structures/CreateRoom.js b/src/components/structures/CreateRoom.js index 116202d324..36cc11575b 100644 --- a/src/components/structures/CreateRoom.js +++ b/src/components/structures/CreateRoom.js @@ -249,13 +249,15 @@ module.exports = React.createClass({ var RoomAlias = sdk.getComponent("create_room.RoomAlias"); var Presets = sdk.getComponent("create_room.Presets"); var UserSelector = sdk.getComponent("elements.UserSelector"); - var RoomHeader = sdk.getComponent("rooms.RoomHeader"); + var SimpleRoomHeader = sdk.getComponent("rooms.SimpleRoomHeader"); var domain = MatrixClientPeg.get().getDomain(); return (
- + + Create room +