Notifications UI
This commit is contained in:
parent
9cb1a059f2
commit
ed868f9c5d
2 changed files with 15 additions and 1 deletions
|
@ -576,8 +576,13 @@
|
|||
button {
|
||||
height: @toolbar_line-height;
|
||||
width: @toolbar_line-height;
|
||||
font-size: 20px;
|
||||
font-size: 15px;
|
||||
margin-top: -1px;
|
||||
.cp-dropdown-button-title {
|
||||
transform: scale(0.5);
|
||||
bottom: -5px;
|
||||
right: -5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cp-toolbar-new {
|
||||
|
@ -917,6 +922,10 @@
|
|||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 16px;
|
||||
&.cp-notifications-small {
|
||||
font-size: 10px;
|
||||
line-height: 17px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -971,11 +971,16 @@ MessengerUI, Messages) {
|
|||
updateUserList(toolbar, config);
|
||||
var n = $(div).find('.cp-notification').length;
|
||||
$button.removeClass('fa-bell-o').removeClass('fa-bell');
|
||||
$n.removeClass('cp-notifications-small');
|
||||
if (n === 0) {
|
||||
$empty.show();
|
||||
$n.hide();
|
||||
return void $button.addClass('fa-bell-o');
|
||||
}
|
||||
if (n > 99) {
|
||||
n = '99+';
|
||||
$n.addClass('cp-notifications-small');
|
||||
}
|
||||
$empty.hide();
|
||||
$n.text(n).show();
|
||||
$button.addClass('fa-bell');
|
||||
|
|
Loading…
Reference in a new issue