From ed868f9c5de727d0fe1500439df89e7b58fb6f0b Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 23 May 2019 11:34:56 +0200 Subject: [PATCH] Notifications UI --- customize.dist/src/less2/include/toolbar.less | 11 ++++++++++- www/common/toolbar3.js | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 0cecd179f..aa0f9c6f5 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -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; + } } } } diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index d21b3f556..5712b02b2 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -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');