diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/menu/notification.component.html | 9 | ||||
-rw-r--r-- | client/src/app/menu/notification.component.ts | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/client/src/app/menu/notification.component.html b/client/src/app/menu/notification.component.html index 890b086f1..7a62800f5 100644 --- a/client/src/app/menu/notification.component.html +++ b/client/src/app/menu/notification.component.html | |||
@@ -1,15 +1,20 @@ | |||
1 | <ng-template #notificationNumber> | ||
2 | <div *ngIf="unreadNotifications > 0 && unreadNotifications < 100" class="unread-notifications">{{ unreadNotifications }}</div> | ||
3 | <div *ngIf="unreadNotifications >= 100" class="unread-notifications">99+</div> | ||
4 | </ng-template> | ||
5 | |||
1 | <div | 6 | <div |
2 | [ngbPopover]="popContent" autoClose="outside" placement="bottom" container={this} popoverClass="popover-notifications" | 7 | [ngbPopover]="popContent" autoClose="outside" placement="bottom" container={this} popoverClass="popover-notifications" |
3 | i18n-title title="View your notifications" [ngClass]="{ 'notification-inbox-popover': true, 'shown': opened, 'hidden': isInMobileView }" | 8 | i18n-title title="View your notifications" [ngClass]="{ 'notification-inbox-popover': true, 'shown': opened, 'hidden': isInMobileView }" |
4 | #popover="ngbPopover" (shown)="onPopoverShown()" (hidden)="onPopoverHidden()" | 9 | #popover="ngbPopover" (shown)="onPopoverShown()" (hidden)="onPopoverHidden()" |
5 | > | 10 | > |
6 | <div *ngIf="unreadNotifications > 0" class="unread-notifications">{{ unreadNotifications }}</div> | 11 | <ng-container *ngTemplateOutlet="notificationNumber"></ng-container> |
7 | 12 | ||
8 | <my-global-icon iconName="bell"></my-global-icon> | 13 | <my-global-icon iconName="bell"></my-global-icon> |
9 | </div> | 14 | </div> |
10 | 15 | ||
11 | <div *ngIf="isInMobileView" i18n-title title="View your notifications" class="notification-inbox-link"> | 16 | <div *ngIf="isInMobileView" i18n-title title="View your notifications" class="notification-inbox-link"> |
12 | <div *ngIf="unreadNotifications > 0" class="unread-notifications">{{ unreadNotifications }}</div> | 17 | <ng-container *ngTemplateOutlet="notificationNumber"></ng-container> |
13 | 18 | ||
14 | <a routerLink="/my-account/notifications" routerLinkActive="active" #link (click)="onNavigate(link)"> | 19 | <a routerLink="/my-account/notifications" routerLinkActive="active" #link (click)="onNavigate(link)"> |
15 | <my-global-icon iconName="bell"></my-global-icon> | 20 | <my-global-icon iconName="bell"></my-global-icon> |
diff --git a/client/src/app/menu/notification.component.ts b/client/src/app/menu/notification.component.ts index ac9c79991..dc88d5a3c 100644 --- a/client/src/app/menu/notification.component.ts +++ b/client/src/app/menu/notification.component.ts | |||
@@ -38,7 +38,7 @@ export class NotificationComponent implements OnInit, OnDestroy { | |||
38 | this.userNotificationService.countUnreadNotifications() | 38 | this.userNotificationService.countUnreadNotifications() |
39 | .subscribe({ | 39 | .subscribe({ |
40 | next: result => { | 40 | next: result => { |
41 | this.unreadNotifications = Math.min(result, 99) // Limit number to 99 | 41 | this.unreadNotifications = 102 |
42 | this.subscribeToNotifications() | 42 | this.subscribeToNotifications() |
43 | }, | 43 | }, |
44 | 44 | ||