diff options
Diffstat (limited to 'client/src/app/menu/avatar-notification.component.ts')
-rw-r--r-- | client/src/app/menu/avatar-notification.component.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/menu/avatar-notification.component.ts b/client/src/app/menu/avatar-notification.component.ts index 9a64faa6a..8b9955069 100644 --- a/client/src/app/menu/avatar-notification.component.ts +++ b/client/src/app/menu/avatar-notification.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Subject, Subscription } from 'rxjs' | 1 | import { Subject, Subscription } from 'rxjs' |
2 | import { filter } from 'rxjs/operators' | 2 | import { filter } from 'rxjs/operators' |
3 | import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core' | 3 | import { Component, EventEmitter, Input, Output, OnDestroy, OnInit, ViewChild } from '@angular/core' |
4 | import { NavigationEnd, Router } from '@angular/router' | 4 | import { NavigationEnd, Router } from '@angular/router' |
5 | import { Notifier, User, UserNotificationSocket } from '@app/core' | 5 | import { Notifier, User, UserNotificationSocket } from '@app/core' |
6 | import { UserNotificationService } from '@app/shared/shared-main' | 6 | import { UserNotificationService } from '@app/shared/shared-main' |
@@ -15,6 +15,7 @@ export class AvatarNotificationComponent implements OnInit, OnDestroy { | |||
15 | @ViewChild('popover', { static: true }) popover: NgbPopover | 15 | @ViewChild('popover', { static: true }) popover: NgbPopover |
16 | 16 | ||
17 | @Input() user: User | 17 | @Input() user: User |
18 | @Output() navigate = new EventEmitter<HTMLAnchorElement>() | ||
18 | 19 | ||
19 | unreadNotifications = 0 | 20 | unreadNotifications = 0 |
20 | loaded = false | 21 | loaded = false |
@@ -65,6 +66,10 @@ export class AvatarNotificationComponent implements OnInit, OnDestroy { | |||
65 | this.loaded = true | 66 | this.loaded = true |
66 | } | 67 | } |
67 | 68 | ||
69 | onNavigate (link: HTMLAnchorElement) { | ||
70 | this.navigate.emit(link) | ||
71 | } | ||
72 | |||
68 | markAllAsRead () { | 73 | markAllAsRead () { |
69 | this.markAllAsReadSubject.next(true) | 74 | this.markAllAsReadSubject.next(true) |
70 | } | 75 | } |