Number of rooms added to header of sections

This commit is contained in:
wmwragg 2016-08-22 17:02:52 +01:00
parent 895172d498
commit ff55a951c9
2 changed files with 11 additions and 2 deletions

View File

@ -328,7 +328,7 @@ var RoomSubList = React.createClass({
_getHeaderJsx: function() {
var TintableSvg = sdk.getComponent("elements.TintableSvg");
var classes = classNames({
var chevronClasses = classNames({
'mx_RoomSubList_chevron': true,
'mx_RoomSubList_chevronUp': this.state.hidden,
'mx_RoomSubList_chevronRight': !this.state.hidden && this.state.capTruncate,
@ -337,7 +337,8 @@ var RoomSubList = React.createClass({
return (
<div onClick={ this.onClick } className="mx_RoomSubList_label">
{ this.props.collapsed ? '' : this.props.label }
<div className={classes}></div>
<div className="mx_RoomSubList_roomCount">{this.props.list.length > 0 ? this.props.list.length : ''}</div>
<div className={chevronClasses}></div>
</div>
);
},

View File

@ -38,6 +38,14 @@ limitations under the License.
height: 16px;
}
.mx_RoomSubList_roomCount {
display: inline-block;
font-size: 12px;
font-weight: normal;
color: #76cfa6;
padding-left: 5px;
}
.mx_RoomSubList_chevron {
pointer-events: none;
position: absolute;