aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html16
-rw-r--r--client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts4
2 files changed, 13 insertions, 7 deletions
diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html
index daf721f03..dec3b14cc 100644
--- a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html
+++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html
@@ -4,12 +4,18 @@
4 Notification preferences 4 Notification preferences
5 </a> 5 </a>
6 6
7 <button class="btn" [disabled]="!getUnreadNotifications()" (click)="markAllAsRead()"> 7 <button class="btn" [disabled]="!hasUnreadNotifications()" (click)="markAllAsRead()">
8 <my-global-icon *ngIf="getUnreadNotifications()" iconName="inbox-full"></my-global-icon> 8 <ng-container *ngIf="hasUnreadNotifications()">
9 <span i18n *ngIf="getUnreadNotifications()">Mark all as read</span> 9 <my-global-icon iconName="inbox-full"></my-global-icon>
10 10
11 <my-global-icon *ngIf="!getUnreadNotifications()" iconName="circle-tick"></my-global-icon> 11 <span i18n>Mark all as read</span>
12 <span i18n *ngIf="!getUnreadNotifications()">All read</span> 12 </ng-container>
13
14 <ng-container *ngIf="!hasUnreadNotifications()">
15 <my-global-icon iconName="circle-tick"></my-global-icon>
16
17 <span i18n>All read</span>
18 </ng-container>
13 </button> 19 </button>
14</div> 20</div>
15 21
diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts
index 156e7713d..a50cb0fb9 100644
--- a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts
+++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts
@@ -12,7 +12,7 @@ export class MyAccountNotificationsComponent {
12 this.userNotification.markAllAsRead() 12 this.userNotification.markAllAsRead()
13 } 13 }
14 14
15 getUnreadNotifications () { 15 hasUnreadNotifications () {
16 return this.userNotification.notifications.filter(n => n.read === false).length 16 return this.userNotification.notifications.filter(n => n.read === false).length !== 0
17 } 17 }
18} 18}