forked from thoth-tech/doubtfire-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotifications-button.component.html
More file actions
35 lines (27 loc) · 1.17 KB
/
Copy pathnotifications-button.component.html
File metadata and controls
35 lines (27 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<button mat-icon-button (click)="toggleNotifications()" aria-label="Notifications" class="notification-button">
<mat-icon>notifications</mat-icon>
<span *ngIf="notifications.length > 0" class="notification-badge">{{ notifications.length }}</span>
</button>
<!-- Notification List Panel -->
<div *ngIf="showNotifications" class="notification-panel" #panel>
<mat-list>
<mat-list-item *ngFor="let note of notifications">
<div class="notification-content">
<span class="mat-body-2">{{ note.message }}</span>
<button mat-icon-button aria-label="Dismiss notification" (click)="dismissNotification(note.id)">
<mat-icon>close</mat-icon>
</button>
</div>
</mat-list-item>
<!-- If no notifications -->
<mat-list-item *ngIf="notifications.length === 0">
<span class="mat-body-2">No notifications</span>
</mat-list-item>
</mat-list>
<div *ngIf="notifications.length > 0" class="delete-all-container">
<button mat-button color="warn" (click)="deleteAllNotifications()">Delete All</button>
</div>
<div class="close-container">
<button mat-button (click)="toggleNotifications()">Close</button>
</div>
</div>