From 784c1b63dc6e0ea1d21dbbd427c5bd0c52b5102c Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 1 Dec 2015 11:19:25 +0000 Subject: [PATCH 1/2] Move remaining vector molecules to components --- src/components/structures/MatrixChat.js | 2 +- src/components/structures/RoomView.js | 4 ++-- src/components/views/rooms/EventTile.js | 4 ++-- src/components/views/rooms/RoomTile.js | 13 +------------ 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 5d25450200..519a6a1298 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -571,7 +571,7 @@ module.exports = React.createClass({ var UserSettings = sdk.getComponent('structures.UserSettings'); var CreateRoom = sdk.getComponent('structures.CreateRoom'); var RoomDirectory = sdk.getComponent('organisms.RoomDirectory'); - var MatrixToolbar = sdk.getComponent('molecules.MatrixToolbar'); + var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar'); // needs to be before normal PageTypes as you are logged in technically if (this.state.screen == 'post_registration') { diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 9fe952dd66..3c56d41f9a 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -513,7 +513,7 @@ module.exports = React.createClass({ }, getEventTiles: function() { - var DateSeparator = sdk.getComponent('molecules.DateSeparator'); + var DateSeparator = sdk.getComponent('messages.DateSeparator'); var cli = MatrixClientPeg.get(); var ret = []; @@ -833,7 +833,7 @@ module.exports = React.createClass({ var MessageComposer = sdk.getComponent('rooms.MessageComposer'); var CallView = sdk.getComponent("voip.CallView"); var RoomSettings = sdk.getComponent("rooms.RoomSettings"); - var SearchBar = sdk.getComponent("molecules.SearchBar"); + var SearchBar = sdk.getComponent("rooms.SearchBar"); if (!this.state.room) { if (this.props.roomId) { diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 81f5ca3a4a..8292cdf826 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -84,7 +84,7 @@ module.exports = React.createClass({ }, onEditClicked: function(e) { - var MessageContextMenu = sdk.getComponent('molecules.MessageContextMenu'); + var MessageContextMenu = sdk.getComponent('rooms.MessageContextMenu'); var buttonRect = e.target.getBoundingClientRect() var x = buttonRect.right; var y = buttonRect.top + (e.target.height / 2); @@ -223,7 +223,7 @@ module.exports = React.createClass({ render: function() { var MessageTimestamp = sdk.getComponent('messages.MessageTimestamp'); - var SenderProfile = sdk.getComponent('molecules.SenderProfile'); + var SenderProfile = sdk.getComponent('messages.SenderProfile'); var MemberAvatar = sdk.getComponent('avatars.MemberAvatar'); var content = this.props.mxEvent.getContent(); diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index b9233f2a32..b1c5ad1d85 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -60,17 +60,6 @@ module.exports = React.createClass({ }, render: function() { - // if (this.props.clientOffset) { - // //console.log("room " + this.props.room.roomId + " has dropTarget clientOffset " + this.props.clientOffset.x + "," + this.props.clientOffset.y); - // } - -/* - if (this.props.room._dragging) { - var RoomDropTarget = sdk.getComponent("molecules.RoomDropTarget"); - return ; - } -*/ - var myUserId = MatrixClientPeg.get().credentials.userId; var me = this.props.room.currentState.members[myUserId]; var classes = classNames({ @@ -117,7 +106,7 @@ module.exports = React.createClass({ label =
{name}
; } else if (this.state.hover) { - var RoomTooltip = sdk.getComponent("molecules.RoomTooltip"); + var RoomTooltip = sdk.getComponent("rooms.RoomTooltip"); label = ; } From 636be0c003a17b0721dea5efec8c476933278d5b Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 1 Dec 2015 15:45:11 +0000 Subject: [PATCH 2/2] Update getComponent paths --- src/components/structures/MatrixChat.js | 6 +++--- src/components/views/rooms/RoomList.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 77915b3664..a6d6716222 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -565,12 +565,12 @@ module.exports = React.createClass({ }, render: function() { - var LeftPanel = sdk.getComponent('organisms.LeftPanel'); + var LeftPanel = sdk.getComponent('structures.LeftPanel'); var RoomView = sdk.getComponent('structures.RoomView'); - var RightPanel = sdk.getComponent('organisms.RightPanel'); + var RightPanel = sdk.getComponent('structures.RightPanel'); var UserSettings = sdk.getComponent('structures.UserSettings'); var CreateRoom = sdk.getComponent('structures.CreateRoom'); - var RoomDirectory = sdk.getComponent('organisms.RoomDirectory'); + var RoomDirectory = sdk.getComponent('structures.RoomDirectory'); var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar'); // needs to be before normal PageTypes as you are logged in technically diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index b228a50fe9..11984da7f3 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -226,7 +226,7 @@ module.exports = React.createClass({ > : null; - var RoomSubList = sdk.getComponent('organisms.RoomSubList'); + var RoomSubList = sdk.getComponent('structures.RoomSubList'); var self = this; return (