UX: when there is nothing new or unread to show, remove those options from the top nav.

This commit is contained in:
Arpit Jalan 2018-03-30 11:38:44 +05:30
parent bf41010ac3
commit 15945bcf15
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ export default Ember.Component.extend(bufferedRender({
} }
} }
if (!this.get('active') && this.currentUser && this.currentUser.trust_level > 1 && (content.get('name') === "new" || content.get('name') === "unread") && (content.get('count') < 1)) {
return;
}
buffer.push(`<a href='${href}'>`); buffer.push(`<a href='${href}'>`);
if (content.get('hasIcon')) { if (content.get('hasIcon')) {
buffer.push("<span class='" + content.get('name') + "'></span>"); buffer.push("<span class='" + content.get('name') + "'></span>");