bring back user page

Adds a UserView that contains a MainSplit with an empty div
and a RightPanel, preset to the given member.

UserView fetches the profile and creates a fake member, which
it passed on to the RightPanel.

this doesn't use the view_user action on purpose, to avoid any
interference of the UserView when trying to view a room member.
This commit is contained in:
Bruno Windels 2019-02-20 12:45:55 +01:00
parent 338eafab2b
commit f11505a9de
8 changed files with 134 additions and 18 deletions

View file

@ -421,6 +421,7 @@ const LoggedInView = React.createClass({
render: function() {
const LeftPanel = sdk.getComponent('structures.LeftPanel');
const RoomView = sdk.getComponent('structures.RoomView');
const UserView = sdk.getComponent('structures.UserView');
const EmbeddedPage = sdk.getComponent('structures.EmbeddedPage');
const GroupView = sdk.getComponent('structures.GroupView');
const MyGroups = sdk.getComponent('structures.MyGroups');
@ -469,9 +470,7 @@ const LoggedInView = React.createClass({
break;
case PageTypes.UserView:
pageElement = null; // deliberately null for now
// TODO: fix/remove UserView
// right_panel = <RightPanel disabled={this.props.rightDisabled} />;
pageElement = <UserView userId={this.props.currentUserId} />;
break;
case PageTypes.GroupView:
pageElement = <GroupView