Fixed up some of the settings on the tv page

This commit is contained in:
tidusjar 2021-02-06 20:56:16 +00:00
commit 5649c18bf5
6 changed files with 26 additions and 26 deletions

View file

@ -22,6 +22,7 @@
[isAdmin]="isAdmin" [isAdmin]="isAdmin"
[canRequestOnBehalf]="!hasRequest && !movie.available" [canRequestOnBehalf]="!hasRequest && !movie.available"
[canShowAdvanced]="showAdvanced && movieRequest" [canShowAdvanced]="showAdvanced && movieRequest"
[type]="requestType"
(openTrailer)="openDialog()" (openTrailer)="openDialog()"
(onRequestBehalf)="openRequestOnBehalf()" (onRequestBehalf)="openRequestOnBehalf()"
(onAdvancedOptions)="openAdvancedOptions()" (onAdvancedOptions)="openAdvancedOptions()"

View file

@ -27,6 +27,9 @@ export class MovieDetailsComponent {
public advancedOptions: IAdvancedData; public advancedOptions: IAdvancedData;
public showAdvanced: boolean; // Set on the UI public showAdvanced: boolean; // Set on the UI
public requestType = RequestType.movie;
private theMovidDbId: number; private theMovidDbId: number;
private imdbId: string; private imdbId: string;

View file

@ -35,7 +35,8 @@
</button> </button>
<button mat-menu-item [disabled]="!canShowAdvanced" (click)="openAdvancedOptions()"> <button mat-menu-item [disabled]="!canShowAdvanced" (click)="openAdvancedOptions()">
<mat-icon>movie_filter</mat-icon> <mat-icon>movie_filter</mat-icon>
<span>{{'MediaDetails.RadarrConfiguration' | translate}}</span> <span *ngIf="type === RequestType.movie">{{'MediaDetails.RadarrConfiguration' | translate}}</span>
<span *ngIf="type === RequestType.tvShow">{{'MediaDetails.SonarrConfiguration' | translate}}</span>
</button> </button>
</mat-menu> </mat-menu>
</div> </div>

View file

@ -1,4 +1,5 @@
import { Component, Input, Output, EventEmitter } from "@angular/core"; import { Component, Input, Output, EventEmitter } from "@angular/core";
import { RequestType } from "../../../../interfaces";
@Component({ @Component({
selector: "social-icons", selector: "social-icons",
templateUrl: "./social-icons.component.html", templateUrl: "./social-icons.component.html",
@ -18,6 +19,7 @@ export class SocialIconsComponent {
@Input() embyUrl: string; @Input() embyUrl: string;
@Input() jellyfinUrl: string; @Input() jellyfinUrl: string;
@Input() doNotAppend: boolean; @Input() doNotAppend: boolean;
@Input() type: RequestType;
@Input() isAdmin: boolean; @Input() isAdmin: boolean;
@Input() canRequestOnBehalf: boolean; @Input() canRequestOnBehalf: boolean;
@ -27,6 +29,8 @@ export class SocialIconsComponent {
@Output() onRequestBehalf: EventEmitter<any> = new EventEmitter(); @Output() onRequestBehalf: EventEmitter<any> = new EventEmitter();
@Output() onAdvancedOptions: EventEmitter<any> = new EventEmitter(); @Output() onAdvancedOptions: EventEmitter<any> = new EventEmitter();
public RequestType = RequestType;
public openDialog() { public openDialog() {
this.openTrailer.emit(); this.openTrailer.emit();

View file

@ -26,7 +26,14 @@
[available]="tv.available || tv.partlyAvailable" [available]="tv.available || tv.partlyAvailable"
[plexUrl]="tv.plexUrl" [plexUrl]="tv.plexUrl"
[embyUrl]="tv.embyUrl" [embyUrl]="tv.embyUrl"
[jellyfinUrl]="tv.jellyfinUrl"> [jellyfinUrl]="tv.jellyfinUrl"
[isAdmin]="isAdmin"
[canRequestOnBehalf]="!showRequest"
[canShowAdvanced]="showAdvanced && showRequest"
[type]="requestType"
(onRequestBehalf)="openRequestOnBehalf()"
(onAdvancedOptions)="openAdvancedOptions()"
>
</social-icons> </social-icons>
</div> </div>
@ -55,23 +62,6 @@
'Requests.ReportIssue' | translate }}</button> 'Requests.ReportIssue' | translate }}</button>
</div> </div>
<!-- Setting/Configuration admin area -->
<div class="col-12 col-lg-1 col-xl-1 media-row content-end">
<button *ngIf="isAdmin" mat-icon-button [matMenuTriggerFor]="menu">
<mat-icon>settings</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item (click)="openRequestOnBehalf()" [disabled]="fullyAvailable">
<mat-icon>supervised_user_circle</mat-icon>
<span>{{'MediaDetails.RequestOnBehalf' | translate}}</span>
</button>
<button mat-menu-item [disabled]="!showAdvanced || !showRequest"
(click)="openAdvancedOptions()">
<mat-icon>movie_filter</mat-icon>
<span>{{'MediaDetails.SonarrConfiguration' | translate}}</span>
</button>
</mat-menu>
</div>
</div> </div>
</div> </div>

View file

@ -28,6 +28,7 @@ export class TvDetailsComponent implements OnInit {
public isAdmin: boolean; public isAdmin: boolean;
public advancedOptions: IAdvancedData; public advancedOptions: IAdvancedData;
public showAdvanced: boolean; // Set on the UI public showAdvanced: boolean; // Set on the UI
public requestType = RequestType.tvShow;
private tvdbId: number; private tvdbId: number;