feat(core): show red dot badge on header when user has new message or H&R warning.

This commit is contained in:
OldHawk
2017-11-07 14:14:58 +08:00
parent 3005a0e4d6
commit 84bd762d63
2 changed files with 18 additions and 0 deletions

View File

@@ -44,6 +44,23 @@ body {
font-size: 18px;
}
.header-red-dot {
position: absolute;
width: 10px;
height: 10px;
top: 12px;
left: 35px;
border-radius: 50%;
border: solid 1px #fff;
&.bg-msg {
background-color: @btn-info-bg !important;
}
&.bg-hnr {
background-color: @btn-danger-bg;
}
}
.user-header-dropdown-toggle {
.img {
position: relative;

View File

@@ -34,6 +34,7 @@
<a class="dropdown-toggle user-header-dropdown-toggle" uib-dropdown-toggle role="button">
<img ng-src="{{vm.authentication.user.profileImageURL}}" alt="{{vm.authentication.user.displayName}}" class="header-profile-image" />
<span class="sm-hide" ng-bind="vm.authentication.user.displayName"></span> <b class="caret"></b>
<span class="header-red-dot" ng-if="vm.unreadCount>0 || vm.user.hnr_warning>0" ng-class="{'bg-hnr': vm.user.hnr_warning>0, 'bg-msg': vm.unreadCount>0}"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>