This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add loading spinner to start component
This prevents displaying a message that no collaborations are available to this user, when truth is that they are still being collected
- Loading branch information
Showing
3 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
<app-page-header title="Choose a collaboration"></app-page-header> | ||
<div class="tile-grid"> | ||
<button mat-raised-button *ngFor="let collaboration of collaborations" (click)="handleCollaborationClick(collaboration)"> | ||
{{ collaboration.name }} | ||
</button> | ||
</div> | ||
<mat-card *ngIf="collaborations.length === 0"> | ||
<mat-card-content> | ||
<p>{{ "start.no-collaborations" | translate }}</p> | ||
</mat-card-content> | ||
</mat-card> | ||
<ng-container *ngIf="!isLoading; else loading"> | ||
<div class="tile-grid"> | ||
<button mat-raised-button *ngFor="let collaboration of collaborations" (click)="handleCollaborationClick(collaboration)"> | ||
{{ collaboration.name }} | ||
</button> | ||
</div> | ||
<mat-card *ngIf="collaborations.length === 0"> | ||
<mat-card-content> | ||
<p>{{ "start.no-collaborations" | translate }}</p> | ||
</mat-card-content> | ||
</mat-card> | ||
</ng-container> | ||
<ng-template #loading> | ||
<mat-spinner diameter="48"></mat-spinner> | ||
</ng-template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,7 @@ | |
padding: $spacing-px-16 0; | ||
} | ||
} | ||
|
||
mat-spinner { | ||
margin: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters