feat(data): show skeleton screens before data is loaded

Closes #4
This commit is contained in:
Jovan Krunić
2019-04-24 09:11:24 +02:00
committed by Sebastian Lange
parent 88f87a2ce1
commit e1039aa226
10 changed files with 102 additions and 39 deletions

View File

@@ -7,12 +7,18 @@
<ion-title text-center>{{'data.detail.TITLE' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding *ngIf="item">
<ion-content padding>
<ion-refresher slot="fixed" (ionRefresh)="refresh($event.target)">
<ion-refresher-content pullingIcon="arrow-dropdown" pullingText="{{'data.REFRESH_ACTION' | translate}}"
refreshingText="{{'data.REFRESHING' | translate}}">
</ion-refresher-content>
</ion-refresher>
<stapps-data-list-item [item]="item"></stapps-data-list-item>
<stapps-data-detail-content [item]="item"></stapps-data-detail-content>
<ng-container *ngIf="!item">
<stapps-skeleton-list-item></stapps-skeleton-list-item>
<stapps-skeleton-simple-card></stapps-skeleton-simple-card>
</ng-container>
<ng-container *ngIf="item">
<stapps-data-list-item [item]="item"></stapps-data-list-item>
<stapps-data-detail-content [item]="item"></stapps-data-detail-content>
</ng-container>
</ion-content>