From 3aaf934c978d9b258baf75e87d1eafbd85619bae Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 20 Jan 2016 22:04:49 +0000 Subject: [PATCH] implement the correct design for memberlist, modulo gemini --- src/components/views/rooms/EntityTile.js | 2 +- src/components/views/rooms/MemberList.js | 10 +++++----- src/components/views/rooms/SearchableEntityList.js | 13 ++++++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/components/views/rooms/EntityTile.js b/src/components/views/rooms/EntityTile.js index d20329fcd8..ed0e5cbc41 100644 --- a/src/components/views/rooms/EntityTile.js +++ b/src/components/views/rooms/EntityTile.js @@ -72,7 +72,7 @@ module.exports = React.createClass({ }, render: function() { - var presenceClass = PRESENCE_CLASS[this.props.presenceState]; + var presenceClass = PRESENCE_CLASS[this.props.presenceState] || "mx_EntityTile_offline"; var mainClassName = "mx_EntityTile "; mainClassName += presenceClass; if (this.state.hover) { diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index e38d6ae41d..69cd6ef9af 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -362,7 +362,7 @@ module.exports = React.createClass({ invitedSection = (

Invited

-
+
{invitedMemberTiles}
@@ -370,15 +370,15 @@ module.exports = React.createClass({ } return (
- {this.inviteTile()} -
+
{this.makeMemberTiles('join', this.state.searchQuery)}
+ {invitedSection} +
+
- {invitedSection} -
); } diff --git a/src/components/views/rooms/SearchableEntityList.js b/src/components/views/rooms/SearchableEntityList.js index b6232362ac..7617a237dc 100644 --- a/src/components/views/rooms/SearchableEntityList.js +++ b/src/components/views/rooms/SearchableEntityList.js @@ -104,13 +104,16 @@ var SearchableEntityList = React.createClass({ } return ( -
+
{inputBox} -
- {this.state.results.map((entity) => { - return entity.getJsx(); - })} +
+
+ {this.state.results.map((entity) => { + return entity.getJsx(); + })} +
+ { this.state.results.length ?

: '' }
); }