[NEW] Show different shape for alert numbers when have mentions

pull/7580/head
Rodrigo Nascimento 8 years ago
parent fc8d0e8103
commit 429e153c16
  1. 4
      packages/rocketchat-theme/server/colors.less
  2. 2
      packages/rocketchat-ui-sidenav/client/chatRoomItem.html
  3. 8
      packages/rocketchat-ui-sidenav/client/chatRoomItem.js

@ -666,6 +666,10 @@ a:hover {
}
.unread {
color: @success-color;
}
.unread.unread-mention {
background-color: @success-color;
color: contrast(@success-color, #000000, #ffffff, 50%);
}

@ -2,7 +2,7 @@
<li class="link-room-{{rid}} background-transparent-darker-hover {{active}} {{#if unread}}has-unread{{/if}} {{#if alert}}has-alert{{/if}}">
<a class="open-room" href="{{route}}" title="{{name}}">
{{#if unread}}
<span class="unread">{{unread}}</span>
<span class="{{unreadClass}}">{{unread}}</span>
{{/if}}
<i class="{{roomIcon}} {{userStatus}}" aria-label=""></i>
<span class='name {{archived}}'>{{name}}</span>

@ -14,6 +14,14 @@ Template.chatRoomItem.helpers({
}
},
unreadClass() {
if (Match.test(this.userMentions, Number) && this.userMentions > 0) {
return 'unread unread-mention';
} else {
return 'unread';
}
},
userStatus() {
const userStatus = RocketChat.roomTypes.getUserStatus(this.t, this.rid);
return `status-${ userStatus || 'offline' }`;

Loading…
Cancel
Save