mirror of
https://github.com/NicolasConstant/sengi
synced 2024-12-27 08:53:48 +01:00
notification hub can display errors
This commit is contained in:
parent
2fd69fbf8f
commit
fbd6e6d412
@ -1,5 +1,5 @@
|
||||
<div class="notification-hub">
|
||||
<div class="notification-hub__notification" *ngFor="let notification of notifications" (click)="onClick(notification)">
|
||||
<div class="notification-hub__notification" [ngClass]="{'notification-hub__notification--error':notification.isError}" *ngFor="let notification of notifications" (click)="onClick(notification)" title="close">
|
||||
{{ notification.message }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -11,5 +11,10 @@
|
||||
border-radius: 2px;
|
||||
margin: 0 0 5px 15px;
|
||||
cursor: pointer;
|
||||
|
||||
&--error{
|
||||
background-color: #be0a0a;
|
||||
color: whitesmoke;
|
||||
}
|
||||
}
|
||||
}
|
@ -20,15 +20,15 @@ export class NotificationHubComponent implements OnInit {
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
// this.autoSubmit();
|
||||
//this.autoSubmit();
|
||||
}
|
||||
|
||||
autoSubmit(): any {
|
||||
this.notificationService.notify("test message", false);
|
||||
this.notificationService.notify("test message", true);
|
||||
|
||||
setTimeout(() => {
|
||||
this.autoSubmit();
|
||||
}, 5000);
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
onClick(notification: NotificatioData): void{
|
||||
|
Loading…
Reference in New Issue
Block a user