Skip to content

Commit

Permalink
Add header property to roomTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed Jul 21, 2017
1 parent fa203fd commit 7ebb77d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/rocketchat-lib/startup/defaultRoomTypes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* globals openRoom */
RocketChat.roomTypes.add(null, 0, {
header: 'favorite',
icon: 'icon-star',
label: 'Favorites'
});
Expand Down
4 changes: 3 additions & 1 deletion packages/rocketchat-ui-sidenav/client/roomList.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ Template.roomList.helpers({
},

roomType(room) {
return room.identifier;
if (room.header || room.identifier) {
return `type-${ room.header || room.identifier }`;
}
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-sidenav/client/sideNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

{{#each roomType}}
{{#if canShowRoomType}}
{{> roomList identifier=identifier label=label isCombined=isCombined }}
{{> roomList identifier=identifier label=label isCombined=isCombined header=header }}
{{/if}}
{{/each}}

Expand Down

0 comments on commit 7ebb77d

Please sign in to comment.