-
-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(discover): Improved rendering on the discover page
- Loading branch information
Showing
7 changed files
with
78 additions
and
37 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
5 changes: 0 additions & 5 deletions
5
src/Ombi/ClientApp/src/app/discover/components/discover/discover.component.html
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
39 changes: 26 additions & 13 deletions
39
src/Ombi/ClientApp/src/app/discover/components/genre/genre-button-select.component.html
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,13 +1,26 @@ | ||
<div class="genre-container" *ngIf="movieGenreList$ | async as movies"> | ||
<mat-button-toggle-group name="discoverMode" (change)="toggleChanged($event, genre.type)" *ngFor="let genre of movies" | ||
class="discover-filter-buttons-group"> | ||
<mat-button-toggle value="{{genre.id}}" class="discover-filter-button">{{genre.name}}</mat-button-toggle> | ||
</mat-button-toggle-group> | ||
</div> | ||
<div class="genre-container" *ngIf="tvGenreList$ | async as tv"> | ||
<mat-button-toggle-group name="discoverMode" (change)="toggleChanged($event, genre.type)" *ngFor="let genre of tv" | ||
class="discover-filter-buttons-group"> | ||
<mat-button-toggle value="{{genre.id}}" class="discover-filter-button">{{genre.name}}</mat-button-toggle> | ||
</mat-button-toggle-group> | ||
<mat-spinner *ngIf="isLoading" [diameter]="30"></mat-spinner> | ||
</div> | ||
|
||
@defer (when movieGenreList()) { | ||
<div class="genre-container"> | ||
<mat-button-toggle-group name="discoverMode" (change)="toggleChanged($event, genre.type)" *ngFor="let genre of movieGenreList()" | ||
class="discover-filter-buttons-group"> | ||
<mat-button-toggle value="{{genre.id}}" class="discover-filter-button">{{genre.name}}</mat-button-toggle> | ||
</mat-button-toggle-group> | ||
</div> | ||
} | ||
@placeholder(minimum 500) { | ||
<p-skeleton width="100%" height="3.5rem"></p-skeleton> | ||
} | ||
|
||
@defer (when tvGenreList()) { | ||
<div class="genre-container"> | ||
<mat-button-toggle-group name="discoverMode" (change)="toggleChanged($event, genre.type)" *ngFor="let genre of tvGenreList()" | ||
class="discover-filter-buttons-group"> | ||
<mat-button-toggle value="{{genre.id}}" class="discover-filter-button">{{genre.name}}</mat-button-toggle> | ||
</mat-button-toggle-group> | ||
</div> | ||
} | ||
@placeholder(minimum 500) { | ||
<p-skeleton width="100%" height="3.5rem"></p-skeleton> | ||
} | ||
|
||
<mat-spinner *ngIf="isLoading" [diameter]="30"></mat-spinner> |
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
31 changes: 22 additions & 9 deletions
31
...rc/app/discover/components/recently-requested-list/recently-requested-list.component.html
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,21 +1,34 @@ | ||
<div *ngIf="requests$ | async as requests"> | ||
<div *ngIf="requests.length > 0"> | ||
<p-carousel #carousel [value]="requests" [numVisible]="3" [numScroll]="1" | ||
@defer (when requests()) { | ||
<div *ngIf="requests().length > 0"> | ||
<p-carousel #carousel [value]="requests()" [numVisible]="3" [numScroll]="1" | ||
[responsiveOptions]="responsiveOptions" [page]="0"> | ||
<ng-template let-result pTemplate="item"> | ||
@defer (on viewport; prefetch on idle) { | ||
<ombi-detailed-card | ||
[request]="result" | ||
[isAdmin]="isAdmin" | ||
(onClick)="navigate(result)" | ||
(onApprove)="approve(result)" | ||
(onDeny)="deny(result)"> | ||
</ombi-detailed-card> | ||
} | ||
@placeholder { | ||
<p-skeleton width="100%" height="315px"></p-skeleton> | ||
} | ||
</ng-template> | ||
</p-carousel> | ||
</div> | ||
</div> | ||
}@placeholder(minimum 500) { | ||
<div class="row loading-container"> | ||
<div class="col-2"> | ||
<p-skeleton width="100%" height="270px"></p-skeleton> | ||
</div> | ||
<div class="col-2"> | ||
<p-skeleton width="100%" height="270px"></p-skeleton> | ||
</div> | ||
<div class="col-2"> | ||
<p-skeleton width="100%" height="270px"></p-skeleton> | ||
</div> | ||
<div class="col-2"> | ||
<p-skeleton width="100%" height="270px"></p-skeleton> | ||
</div> | ||
<div class="col-2"> | ||
<p-skeleton width="100%" height="270px"></p-skeleton> | ||
</div> | ||
</div> | ||
} |
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 |
---|---|---|
|
@@ -109,4 +109,8 @@ | |
::ng-deep .p-carousel-item{ | ||
flex: 1 0 200px !important; | ||
} | ||
} | ||
|
||
.loading-container { | ||
margin-left: 10rem; | ||
} |
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