mirror of https://github.com/Ombi-app/Ombi
parent
09f365c039
commit
3c959284f5
@ -0,0 +1,26 @@
|
||||
<div class="small-middle-container">
|
||||
|
||||
<div class="row justify-content-md-center top-spacing">
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<button type="button" (click)="popular()" [attr.color]="popularActive ? 'accent' : 'primary'"
|
||||
[ngClass]="popularActive ? 'mat-accent' : 'mat-primary'" mat-raised-button
|
||||
class="btn grow" >{{'Discovery.PopularTab' | translate}}</button>
|
||||
<button type="button" (click)="trending()"
|
||||
[attr.color]="trendingActive ? 'accent' : 'primary'"
|
||||
[ngClass]="trendingActive ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button class="btn grow" color="primary">{{'Discovery.TrendingTab' | translate}}</button>
|
||||
<button type="button" (click)="upcoming()"
|
||||
[attr.color]="upcomingActive ? 'accent' : 'primary'"
|
||||
[ngClass]="upcomingActive ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button class="btn grow" color="primary">{{'Discovery.UpcomingTab' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="loadingFlag" class="row justify-content-md-center top-spacing loading-spinner">
|
||||
<mat-spinner [color]="'accent'"></mat-spinner>
|
||||
</div>
|
||||
<div *ngIf="discoverResults" class="row full-height">
|
||||
<div class="col-xl-2 col-lg-3 col-md-3 col-6 col-sm-4 small-padding" *ngFor="let result of discoverResults">
|
||||
<discover-card [result]="result"></discover-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,19 @@
|
||||
.full-height {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.small-middle-container{
|
||||
margin: auto;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.small-padding {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
margin: 10%;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { SearchV2Service } from "../../services";
|
||||
import { IMovieCollectionsViewModel } from "../../interfaces/ISearchTvResultV2";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./discover-collections.component.html",
|
||||
styleUrls: ["./discover-collections.component.scss"],
|
||||
})
|
||||
export class DiscoverCollectionsComponent implements OnInit {
|
||||
|
||||
public collectionId: number;
|
||||
public collection: IMovieCollectionsViewModel;
|
||||
|
||||
constructor(private searchService: SearchV2Service, private route: ActivatedRoute) {
|
||||
this.route.params.subscribe((params: any) => {
|
||||
this.collectionId = params.collectionId;
|
||||
});
|
||||
}
|
||||
|
||||
public async ngOnInit() {
|
||||
this.collection = await this.searchService.getMovieCollections(this.collectionId);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue