Skip to content
Snippets Groups Projects
Commit 05ca0b98 authored by Karl Prieb's avatar Karl Prieb
Browse files

add more private groups button

parent db295be1
No related merge requests found
...@@ -15,9 +15,13 @@ ...@@ -15,9 +15,13 @@
{{/each}} {{/each}}
</ul> </ul>
{{#if hasMoreButton ..}} {{#if hasMoreChannelsButton ..}}
<button class="more more-channels background-transparent-darker-hover">{{_ "More_channels"}}...</button> <button class="more more-channels background-transparent-darker-hover">{{_ "More_channels"}}...</button>
{{/if}} {{/if}}
{{#if hasMoreGroupsButton ..}}
<button class="more more-groups background-transparent-darker-hover">{{_ "More_groups"}}...</button>
{{/if}}
{{/with}} {{/with}}
{{/if}} {{/if}}
{{/if}} {{/if}}
......
...@@ -64,13 +64,17 @@ Template.roomList.helpers({ ...@@ -64,13 +64,17 @@ Template.roomList.helpers({
return classes; return classes;
}, },
hasMoreButton(room) { hasMoreChannelsButton(room) {
return room.identifier === 'c' || room.identifier === 'p' || room.anonymous; return room.identifier === 'c' || room.anonymous;
},
hasMoreGroupsButton(room) {
return room.identifier === 'p';
} }
}); });
Template.roomList.events({ Template.roomList.events({
'click .more-channels'(e, t) { 'click .more'(e, t) {
if (t.data.identifier === 'p') { if (t.data.identifier === 'p') {
SideNav.setFlex('listPrivateGroupsFlex'); SideNav.setFlex('listPrivateGroupsFlex');
} else if (t.data.isCombined) { } else if (t.data.isCombined) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment