(Kavita+) External Series Detail (#2309)
This commit is contained in:
parent
bd62e00ec5
commit
6067c9233c
32 changed files with 2354 additions and 726 deletions
|
@ -1,4 +1,4 @@
|
|||
<img #img class="lazyload img-placeholder" src="data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
|
||||
<img #img class="lazyload img-placeholder {{classes}}" src="data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
|
||||
[attr.data-src]="imageUrl"
|
||||
(error)="imageService.updateErroredImage($event)"
|
||||
aria-hidden="true"
|
||||
|
|
|
@ -64,6 +64,7 @@ export class ImageComponent implements OnChanges {
|
|||
* If the image component should respond to cover updates
|
||||
*/
|
||||
@Input() processEvents: boolean = true;
|
||||
@Input() classes: string = '';
|
||||
|
||||
@ViewChild('img', {static: true}) imgElem!: ElementRef<HTMLImageElement>;
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
<div class="tagbadge cursor clickable" *ngIf="person !== undefined">
|
||||
<div class="d-flex">
|
||||
<i class="fa fa-user-circle align-self-center me-2" aria-hidden="true"></i>
|
||||
<ng-container *ngIf="isStaff && staff.imageUrl && !staff.imageUrl.endsWith('default.jpg'); else localPerson">
|
||||
<app-image height="24px" width="24px" objectFit="contain" [imageUrl]="staff.imageUrl"></app-image>
|
||||
</ng-container>
|
||||
<ng-template #localPerson>
|
||||
<i class="fa fa-user-circle align-self-center me-2" aria-hidden="true"></i>
|
||||
</ng-template>
|
||||
<div class="flex-grow-1">
|
||||
<span class="mt-0 mb-0">{{person.name}}</span>
|
||||
<span class="mt-0 mb-0">
|
||||
{{person.name}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,18 +1,28 @@
|
|||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, Input, OnInit} from '@angular/core';
|
||||
import { Person } from '../../_models/metadata/person';
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {SeriesStaff} from "../../_models/series-detail/external-series-detail";
|
||||
import {ImageComponent} from "../image/image.component";
|
||||
|
||||
@Component({
|
||||
selector: 'app-person-badge',
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
imports: [CommonModule, ImageComponent],
|
||||
templateUrl: './person-badge.component.html',
|
||||
styleUrls: ['./person-badge.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class PersonBadgeComponent {
|
||||
export class PersonBadgeComponent implements OnInit {
|
||||
|
||||
@Input({required: true}) person!: Person;
|
||||
@Input({required: true}) person!: Person | SeriesStaff;
|
||||
@Input() isStaff = false;
|
||||
|
||||
constructor() { }
|
||||
private readonly cdRef = inject(ChangeDetectorRef);
|
||||
|
||||
staff!: SeriesStaff;
|
||||
|
||||
ngOnInit() {
|
||||
this.staff = this.person as SeriesStaff;
|
||||
this.cdRef.markForCheck();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue