mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-06 21:42:49 +00:00
feat: add "no results" screen to search
This commit is contained in:
@@ -11,20 +11,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.notFoundContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
min-height: 50vh;
|
||||
|
||||
ion-icon {
|
||||
font-size: 64px;
|
||||
}
|
||||
|
||||
ion-label {
|
||||
font-size: x-large;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import {DataProvider} from '../data.provider';
|
||||
@Component({
|
||||
selector: 'stapps-data-list',
|
||||
templateUrl: 'data-list.html',
|
||||
styleUrls: ['data-list.scss'],
|
||||
providers: [ContextMenuService],
|
||||
})
|
||||
export class DataListComponent implements OnInit {
|
||||
|
||||
@@ -19,9 +19,16 @@
|
||||
|
||||
<ion-content id="data-list">
|
||||
<div *ngIf="items | async as items; else loading">
|
||||
<ion-list>
|
||||
<ion-list *ngIf='items.length > 0; else empty'>
|
||||
<stapps-data-list-item [item]="item" *ngFor="let item of items"></stapps-data-list-item>
|
||||
</ion-list>
|
||||
<ng-template #empty>
|
||||
<div>
|
||||
<ion-label class='notFoundContainer'>
|
||||
{{'search.nothing_found' | translate}}
|
||||
</ion-label>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
<ng-template #loading>
|
||||
<stapps-skeleton-list-item *ngFor="let skeleton of [1, 2, 3, 4, 5]"></stapps-skeleton-list-item>
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
"settings": "Einstellungen"
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"nothing_found": "Keine Ergebnisse"
|
||||
},
|
||||
"settings": {
|
||||
"resetAlert.title": "Alle Einstellungen zurücksetzen?",
|
||||
"resetAlert.message": "Sind Sie sich sicher, alle Einstellungen auf ihre Anfangswerte zurückzusetzen?",
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
"settings": "settings"
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"nothing_found": "No results"
|
||||
},
|
||||
"settings": {
|
||||
"resetAlert.title": "Reset all settings?",
|
||||
"resetAlert.message": "Are you sure to reset all settings to their default values?",
|
||||
|
||||
@@ -31,3 +31,20 @@ ion-item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.notFoundContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
min-height: 50vh;
|
||||
|
||||
ion-icon {
|
||||
font-size: 64px;
|
||||
}
|
||||
|
||||
ion-label {
|
||||
font-size: x-large;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user