1
0
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:
Nicolas Constant 2019-02-11 20:12:26 -05:00
parent 2fd69fbf8f
commit fbd6e6d412
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
3 changed files with 9 additions and 4 deletions

View File

@ -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>

View File

@ -11,5 +11,10 @@
border-radius: 2px;
margin: 0 0 5px 15px;
cursor: pointer;
&--error{
background-color: #be0a0a;
color: whitesmoke;
}
}
}

View File

@ -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{