show error message when dashboard cannot be loaded
This commit is contained in:
@@ -4,20 +4,32 @@
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
.spinner {
|
||||
.center {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.center-content {
|
||||
text-align: center;
|
||||
}
|
||||
.is-error {
|
||||
font-size: 3rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0.5em;
|
||||
}
|
||||
</style>
|
||||
<div *ngIf="dashboard === undefined" class="spinner">
|
||||
|
||||
<div *ngIf="dashboard === undefined && !error" class="center">
|
||||
<mat-spinner></mat-spinner>
|
||||
</div>
|
||||
<div *ngIf="error" class="center center-content">
|
||||
<div class="is-error">{{error}}</div>
|
||||
<div>Try another <a [routerLink]="['/dashboard']">dashboard</a>.</div>
|
||||
</div>
|
||||
<div *ngIf="dashboard !== undefined" class="content">
|
||||
<div class="toolbar">
|
||||
<button mat-button (click)="addText()">Add Text</button>
|
||||
|
||||
Reference in New Issue
Block a user