correct layout for truncated lists

This commit is contained in:
Matthew Hodgson 2016-01-21 17:39:12 +00:00
parent b45e5e6eb5
commit 8ccc3f04c3
2 changed files with 5 additions and 4 deletions

View file

@ -35,6 +35,7 @@ module.exports = React.createClass({
name: React.PropTypes.string,
title: React.PropTypes.string,
avatarJsx: React.PropTypes.any, // <BaseAvatar />
className: React.PropTypes.string,
presenceState: React.PropTypes.string,
presenceActiveAgo: React.PropTypes.number,
showInviteButton: React.PropTypes.bool,
@ -76,7 +77,7 @@ module.exports = React.createClass({
render: function() {
var presenceClass = PRESENCE_CLASS[this.props.presenceState] || "mx_EntityTile_offline";
var mainClassName = "mx_EntityTile ";
mainClassName += presenceClass;
mainClassName += presenceClass + (this.props.className ? (" " + this.props.className) : "");
var nameEl;
if (this.state.hover && !this.props.suppressOnHover) {

View file

@ -262,10 +262,10 @@ module.exports = React.createClass({
// For now we'll pretend this is any entity. It should probably be a separate tile.
var EntityTile = sdk.getComponent("rooms.EntityTile");
var BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
var text = "and " + overflowCount + " more";
var text = "and " + overflowCount + " other" + (overflowCount > 1 : "s" : "") + "...";
return (
<EntityTile avatarJsx={
<BaseAvatar name="+" width={36} height={36} />
<EntityTile className="mx_EntityTile_ellipsis" avatarJsx={
<BaseAvatar url="img/ellipsis.svg" name="..." width={36} height={36} />
} name={text} presenceState="online" suppressOnHover={true}
onClick={this._showFullMemberList} />
);