Fixed up some of the settings on the tv page

pull/4040/head
tidusjar 4 years ago
parent 6c3d7b34d3
commit 5649c18bf5

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

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

@ -35,7 +35,8 @@
</button>
<button mat-menu-item [disabled]="!canShowAdvanced" (click)="openAdvancedOptions()">
<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>
</mat-menu>
</div>

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

@ -17,16 +17,23 @@
<top-banner [background]="tv.background" [available]="tv.available" [title]="tv.title"
[releaseDate]="tv.firstAired" [tagline]="tv.certification"></top-banner>
<div class="social-icons-container">
<social-icons
[homepage]="tv.homepage"
[tvdbId]="tv.id"
<social-icons
[homepage]="tv.homepage"
[tvdbId]="tv.id"
[hasTrailer]="tv.trailer"
(openTrailer)="openDialog()"
[imdbId]="tv.imdbId"
(openTrailer)="openDialog()"
[imdbId]="tv.imdbId"
[available]="tv.available || tv.partlyAvailable"
[plexUrl]="tv.plexUrl"
[embyUrl]="tv.embyUrl"
[jellyfinUrl]="tv.jellyfinUrl">
[plexUrl]="tv.plexUrl"
[embyUrl]="tv.embyUrl"
[jellyfinUrl]="tv.jellyfinUrl"
[isAdmin]="isAdmin"
[canRequestOnBehalf]="!showRequest"
[canShowAdvanced]="showAdvanced && showRequest"
[type]="requestType"
(onRequestBehalf)="openRequestOnBehalf()"
(onAdvancedOptions)="openAdvancedOptions()"
>
</social-icons>
</div>
@ -55,23 +62,6 @@
'Requests.ReportIssue' | translate }}</button>
</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>

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

Loading…
Cancel
Save