mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-22 15:00:35 -04:00
Adding a favicon & finishing the genre/studio filter pannel
This commit is contained in:
parent
be02aa552f
commit
8ac458c79b
@ -12,7 +12,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-menu #filterMenu="matMenu">
|
<mat-menu #filterMenu="matMenu" class="big-panel">
|
||||||
|
<h4><b>Genres</b></h4>
|
||||||
<mat-chip-list>
|
<mat-chip-list>
|
||||||
<!--suppress AngularInvalidExpressionResultType ('default' color is valid for mat-chip)-->
|
<!--suppress AngularInvalidExpressionResultType ('default' color is valid for mat-chip)-->
|
||||||
<mat-chip *ngFor="let genre of this.genres"
|
<mat-chip *ngFor="let genre of this.genres"
|
||||||
@ -23,6 +24,19 @@
|
|||||||
{{genre.name}}
|
{{genre.name}}
|
||||||
</mat-chip>
|
</mat-chip>
|
||||||
</mat-chip-list>
|
</mat-chip-list>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<h4><b>Studios</b></h4>
|
||||||
|
<mat-chip-list>
|
||||||
|
<!--suppress AngularInvalidExpressionResultType ('default' color is valid for mat-chip)-->
|
||||||
|
<mat-chip *ngFor="let studio of this.studios"
|
||||||
|
[color]="this.filters.studios.includes(studio) ? 'accent' : 'default'" selected
|
||||||
|
(click)="this.filters.studios.includes(studio)
|
||||||
|
? this.filters.studios.splice(this.filters.studios.indexOf(studio), 1)
|
||||||
|
: this.filters.studios.push(studio)">
|
||||||
|
{{studio.name}}
|
||||||
|
</mat-chip>
|
||||||
|
</mat-chip-list>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<mat-menu #sortMenu="matMenu">
|
<mat-menu #sortMenu="matMenu">
|
||||||
|
@ -20,7 +20,7 @@ button
|
|||||||
|
|
||||||
.show
|
.show
|
||||||
{
|
{
|
||||||
width: 28%;
|
width: 27%;
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
max-width: 168px;
|
max-width: 168px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@ -94,3 +94,23 @@ button
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::ng-deep .big-panel
|
||||||
|
{
|
||||||
|
width: 50vw !important;
|
||||||
|
max-width: none !important;
|
||||||
|
margin-left: -20vw;
|
||||||
|
margin-right: -20vw;
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
> div
|
||||||
|
{
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
> mat-chip-list > div
|
||||||
|
{
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -7,6 +7,7 @@ import {Page} from "../../../models/page";
|
|||||||
import {HttpClient} from "@angular/common/http";
|
import {HttpClient} from "@angular/common/http";
|
||||||
import {Show, ShowRole} from "../../../models/resources/show";
|
import {Show, ShowRole} from "../../../models/resources/show";
|
||||||
import {Collection} from "../../../models/resources/collection";
|
import {Collection} from "../../../models/resources/collection";
|
||||||
|
import { Studio } from "../../../models/resources/studio";
|
||||||
import {ItemsUtils} from "../../misc/items-utils";
|
import {ItemsUtils} from "../../misc/items-utils";
|
||||||
import { PreLoaderService } from "../../services/pre-loader.service";
|
import { PreLoaderService } from "../../services/pre-loader.service";
|
||||||
|
|
||||||
@ -22,8 +23,9 @@ export class ItemsGridComponent
|
|||||||
sortType: string = "title";
|
sortType: string = "title";
|
||||||
sortKeys: string[] = ["title", "start year", "end year"]
|
sortKeys: string[] = ["title", "start year", "end year"]
|
||||||
sortUp: boolean = true;
|
sortUp: boolean = true;
|
||||||
filters: {genres: Genre[]} = {genres: []};
|
filters: {genres: Genre[], studios: Studio[]} = {genres: [], studios: []};
|
||||||
genres: Genre[] = [];
|
genres: Genre[] = [];
|
||||||
|
studios: Studio[] = [];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private sanitizer: DomSanitizer,
|
private sanitizer: DomSanitizer,
|
||||||
@ -38,11 +40,15 @@ export class ItemsGridComponent
|
|||||||
{
|
{
|
||||||
this.genres = data;
|
this.genres = data;
|
||||||
});
|
});
|
||||||
|
this.loader.load<Studio>("/api/studios?limit=0").subscribe(data =>
|
||||||
|
{
|
||||||
|
this.studios = data;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getFilterCount()
|
getFilterCount()
|
||||||
{
|
{
|
||||||
return this.filters.genres.length;
|
return this.filters.genres.length + this.filters.studios.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
getThumb(slug: string)
|
getThumb(slug: string)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 99 KiB |
Loading…
x
Reference in New Issue
Block a user