add plus button for rooms and people
This commit is contained in:
parent
197dd57461
commit
6af61ebb09
5 changed files with 29 additions and 5 deletions
|
@ -266,6 +266,7 @@ const RoomSubList = React.createClass({
|
|||
},
|
||||
|
||||
_getHeaderJsx: function() {
|
||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||
const subListNotifications = this.roomNotificationCount();
|
||||
const subListNotifCount = subListNotifications[0];
|
||||
const subListNotifHighlight = subListNotifications[1];
|
||||
|
@ -319,9 +320,13 @@ const RoomSubList = React.createClass({
|
|||
}
|
||||
}
|
||||
|
||||
let addRoomButton;
|
||||
if (this.props.onAddRoom) {
|
||||
addRoomButton = (<AccessibleButton onClick={ this.props.onAddRoom } className="mx_RoomSubList_addRoom">+</AccessibleButton>);
|
||||
}
|
||||
|
||||
const tabindex = this.props.searchFilter === "" ? "0" : "-1";
|
||||
|
||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||
return (
|
||||
<div className="mx_RoomSubList_labelContainer" title={ title } ref="header">
|
||||
<AccessibleButton onClick={ this.onClick } className="mx_RoomSubList_label" tabIndex={tabindex}>
|
||||
|
@ -330,6 +335,7 @@ const RoomSubList = React.createClass({
|
|||
{ badge }
|
||||
{ incomingCall }
|
||||
</AccessibleButton>
|
||||
{ addRoomButton }
|
||||
</div>
|
||||
);
|
||||
// <div className="mx_RoomSubList_roomCount">{ roomCount }</div>
|
||||
|
|
|
@ -573,6 +573,7 @@ module.exports = React.createClass({
|
|||
headerItems: this._getHeaderItems('im.vector.fake.direct'),
|
||||
order: "recent",
|
||||
alwaysShowHeader: true,
|
||||
onAddRoom: () => {dis.dispatch({action: 'view_create_chat'})},
|
||||
},
|
||||
{
|
||||
list: self.state.lists['im.vector.fake.recent'],
|
||||
|
@ -580,6 +581,7 @@ module.exports = React.createClass({
|
|||
emptyContent: this._getEmptyContent('im.vector.fake.recent'),
|
||||
headerItems: this._getHeaderItems('im.vector.fake.recent'),
|
||||
order: "recent",
|
||||
onAddRoom: () => {dis.dispatch({action: 'view_create_room'})},
|
||||
},
|
||||
];
|
||||
const tagSubLists = Object.keys(self.state.lists)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue