mirror of https://github.com/Ombi-app/Ombi
chore: Angular 17 upgrade (#5082)
parent
adfbc845a2
commit
617f26b332
@ -1,70 +1,71 @@
|
||||
{
|
||||
"name": "ombi",
|
||||
"version": "3.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port 3578 --configuration hmr",
|
||||
"build": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build -c production",
|
||||
"lint": "ng lint",
|
||||
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"chromatic": "chromatic --exit-zero-on-changes",
|
||||
"storybookbuild": "yarn build-storybook"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^15.2.10",
|
||||
"@angular/cdk": "^14.2.7",
|
||||
"@angular/common": "^15.2.10",
|
||||
"@angular/compiler": "^15.2.10",
|
||||
"@angular/core": "^15.2.10",
|
||||
"@angular/forms": "^15.2.10",
|
||||
"@angular/material": "^14.2.7",
|
||||
"@angular/platform-browser": "^15.2.10",
|
||||
"@angular/platform-browser-dynamic": "^15.2.10",
|
||||
"@angular/platform-server": "^15.2.10",
|
||||
"@angular/router": "^15.2.10",
|
||||
"@angularclass/hmr": "^3.0.0",
|
||||
"@auth0/angular-jwt": "^5.0.2",
|
||||
"@fortawesome/fontawesome-free": "^6.5.0",
|
||||
"@microsoft/signalr": "^6.0.23",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@ngx-translate/http-loader": "^7.0.0",
|
||||
"@ngxs/devtools-plugin": "3.8.2",
|
||||
"@ngxs/store": "3.8.2",
|
||||
"@types/jquery": "^3.5.28",
|
||||
"@yellowspot/ng-truncate": "^2.0.0",
|
||||
"angularx-qrcode": "^15.0.0",
|
||||
"bootstrap": "^4.2.1",
|
||||
"core-js": "^2.5.4",
|
||||
"jquery": "3.7.1",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.30.1",
|
||||
"ng2-cookies": "^1.0.12",
|
||||
"ngx-clipboard": "^12.1.0",
|
||||
"ngx-infinite-scroll": "^9.0.0",
|
||||
"ngx-moment": "^3.0.1",
|
||||
"ngx-order-pipe": "^2.2.0",
|
||||
"popper.js": "^1.14.3",
|
||||
"primeicons": "^6.0.1",
|
||||
"primeng": "^15.4.1",
|
||||
"rxjs": "^7.5.4",
|
||||
"ts-md5": "^1.2.7",
|
||||
"zone.js": "~0.13.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^15.0.2",
|
||||
"@angular/cli": "^15.0.2",
|
||||
"@angular/compiler-cli": "^15.0.4",
|
||||
"@babel/core": "^7.18.9",
|
||||
"@compodoc/compodoc": "^1.1.19",
|
||||
"@storybook/angular": "^6.5.9",
|
||||
"chromatic": "^6.7.1",
|
||||
"typescript": "~4.8.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~5.0.1",
|
||||
"tslint": "^5.12.0"
|
||||
}
|
||||
"name": "ombi",
|
||||
"version": "4.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port 3578 --configuration hmr",
|
||||
"build": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build -c production",
|
||||
"lint": "ng lint",
|
||||
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"chromatic": "chromatic --exit-zero-on-changes",
|
||||
"storybookbuild": "yarn build-storybook"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^17.1.3",
|
||||
"@angular/cdk": "16.2.14",
|
||||
"@angular/common": "^17.1.3",
|
||||
"@angular/compiler": "^17.1.3",
|
||||
"@angular/core": "^17.1.3",
|
||||
"@angular/forms": "^17.1.3",
|
||||
"@angular/material": "^14.2.7",
|
||||
"@angular/platform-browser": "^17.1.3",
|
||||
"@angular/platform-browser-dynamic": "^17.1.3",
|
||||
"@angular/platform-server": "^17.1.3",
|
||||
"@angular/router": "^17.1.3",
|
||||
"@angularclass/hmr": "^3.0.0",
|
||||
"@auth0/angular-jwt": "^5.0.2",
|
||||
"@fortawesome/fontawesome-free": "^6.4.2",
|
||||
"@microsoft/signalr": "^6.0.23",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@ngx-translate/http-loader": "^7.0.0",
|
||||
"@ngxs/devtools-plugin": "3.8.1",
|
||||
"@ngxs/store": "3.8.1",
|
||||
"@types/jquery": "^3.5.23",
|
||||
"@yellowspot/ng-truncate": "^2.0.0",
|
||||
"angularx-qrcode": "^16.0.0",
|
||||
"bootstrap": "^4.2.1",
|
||||
"core-js": "^2.5.4",
|
||||
"date-fns": "3.3.1",
|
||||
"jquery": "3.7.1",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"ng2-cookies": "^1.0.12",
|
||||
"ngx-clipboard": "^16.0.0",
|
||||
"ngx-date-fns": "^11.0.0",
|
||||
"ngx-infinite-scroll": "^17.0.0",
|
||||
"popper.js": "^1.14.3",
|
||||
"primeicons": "^6.0.1",
|
||||
"primeng": "^17.6.0",
|
||||
"rxjs": "^7.5.4",
|
||||
"ts-md5": "^1.2.7",
|
||||
"zone.js": "0.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^17.1.3",
|
||||
"@angular/cli": "^17.1.3",
|
||||
"@angular/compiler-cli": "^17.1.3",
|
||||
"@babel/core": "^7.18.9",
|
||||
"@compodoc/compodoc": "^1.1.19",
|
||||
"@storybook/angular": "7.6.14",
|
||||
"@types/node": "^20.11.17",
|
||||
"chromatic": "^6.7.1",
|
||||
"typescript": "5.2.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~5.0.1",
|
||||
"tslint": "^5.12.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,43 +1,42 @@
|
||||
import { OmbiCommonModules } from "../modules";
|
||||
import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||
import { DomSanitizer } from "@angular/platform-browser";
|
||||
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
|
||||
import { ImageService } from "../../services";
|
||||
import { fadeInOutAnimation } from "app/animations/fadeinout";
|
||||
import { OmbiCommonModules } from '../modules';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ImageService } from '../../services';
|
||||
import { fadeInOutAnimation } from 'app/animations/fadeinout';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'ombi-image-background',
|
||||
templateUrl: './image-background.component.html',
|
||||
styleUrls: ['./image-background.component.scss'],
|
||||
imports: [...OmbiCommonModules, BrowserAnimationsModule],
|
||||
providers: [ ImageService ],
|
||||
animations: [ fadeInOutAnimation ],
|
||||
})
|
||||
export class ImageBackgroundComponent implements OnInit, OnDestroy {
|
||||
standalone: true,
|
||||
selector: 'ombi-image-background',
|
||||
templateUrl: './image-background.component.html',
|
||||
styleUrls: ['./image-background.component.scss'],
|
||||
imports: [...OmbiCommonModules, BrowserAnimationsModule],
|
||||
providers: [ImageService],
|
||||
animations: [fadeInOutAnimation],
|
||||
})
|
||||
export class ImageBackgroundComponent implements OnInit, OnDestroy {
|
||||
public background: any;
|
||||
public name: string;
|
||||
private timer: any;
|
||||
|
||||
public background: any;
|
||||
public name: string;
|
||||
private timer: NodeJS.Timeout;
|
||||
constructor(private images: ImageService, private sanitizer: DomSanitizer) {}
|
||||
|
||||
constructor(private images: ImageService, private sanitizer: DomSanitizer) { }
|
||||
public ngOnDestroy(): void {
|
||||
clearTimeout(this.timer);
|
||||
}
|
||||
|
||||
public ngOnDestroy(): void {
|
||||
clearTimeout(this.timer);
|
||||
}
|
||||
public ngOnInit(): void {
|
||||
this.cycleBackground();
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.cycleBackground();
|
||||
this.timer = setInterval(() => {
|
||||
this.cycleBackground();
|
||||
}, 30000);
|
||||
}
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
this.cycleBackground();
|
||||
}, 30000);
|
||||
}
|
||||
|
||||
private cycleBackground() {
|
||||
this.images.getRandomBackgroundWithInfo().subscribe((x) => {
|
||||
this.background = this.sanitizer.bypassSecurityTrustStyle("url(" + x.url + ")");
|
||||
this.name = x.name;
|
||||
});
|
||||
}
|
||||
}
|
||||
private cycleBackground() {
|
||||
this.images.getRandomBackgroundWithInfo().subscribe((x) => {
|
||||
this.background = this.sanitizer.bypassSecurityTrustStyle('url(' + x.url + ')');
|
||||
this.name = x.name;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { MomentModule } from "ngx-moment";
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
export const OmbiCommonModules = [ CommonModule, MomentModule ];
|
||||
export const OmbiCommonModules = [CommonModule];
|
||||
|
@ -1,4 +0,0 @@
|
||||
$primary-colour: #df691a;
|
||||
$primary-colour-outline: #ff761b;
|
||||
$bg-colour: #333333;
|
||||
$bg-colour-disabled: #252424;
|
@ -1,43 +1,46 @@
|
||||
<div class="small-middle-container">
|
||||
<div class="section">
|
||||
<h2 id="genreHeading" data-toggle="collapse" href="#genreCollapse" role="button">{{'Discovery.Genres' | translate}}</h2>
|
||||
<genre-button-select class="collapse show" id="genreCollapse"></genre-button-select>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>{{'Discovery.RecentlyRequestedTab' | translate}}</h2>
|
||||
<div>
|
||||
<ombi-recently-list [id]="'recentlyRequested'"></ombi-recently-list>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2 id="genreHeading" data-toggle="collapse" href="#genreCollapse" role="button">{{ 'Discovery.Genres' | translate }}</h2>
|
||||
<genre-button-select class="collapse show" id="genreCollapse"></genre-button-select>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>{{ 'Discovery.RecentlyRequestedTab' | translate }}</h2>
|
||||
<div>
|
||||
<ombi-recently-list [id]="'recentlyRequested'"></ombi-recently-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section" [hidden]="!showSeasonal">
|
||||
<h2>{{'Discovery.SeasonalTab' | translate}}</h2>
|
||||
<div>
|
||||
<carousel-list [id]="'seasonal'" [isAdmin]="isAdmin" [discoverType]="DiscoverType.Seasonal" (movieCount)="setSeasonalMovieCount($event)"></carousel-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>{{'Discovery.PopularTab' | translate}}</h2>
|
||||
<div>
|
||||
<carousel-list [id]="'popular'" [isAdmin]="isAdmin" [discoverType]="DiscoverType.Popular"></carousel-list>
|
||||
</div>
|
||||
<div class="section" [hidden]="!showSeasonal">
|
||||
<h2>{{ 'Discovery.SeasonalTab' | translate }}</h2>
|
||||
<div>
|
||||
<carousel-list
|
||||
[id]="'seasonal'"
|
||||
[isAdmin]="isAdmin"
|
||||
[discoverType]="DiscoverType.Seasonal"
|
||||
(movieCount)="setSeasonalMovieCount($event)"
|
||||
></carousel-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>{{ 'Discovery.PopularTab' | translate }}</h2>
|
||||
<div>
|
||||
<carousel-list [id]="'popular'" [isAdmin]="isAdmin" [discoverType]="DiscoverType.Popular"></carousel-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>{{'Discovery.TrendingTab' | translate}}</h2>
|
||||
<div >
|
||||
<carousel-list [id]="'trending'" [isAdmin]="isAdmin" [discoverType]="DiscoverType.Trending"></carousel-list>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>{{ 'Discovery.TrendingTab' | translate }}</h2>
|
||||
<div>
|
||||
<carousel-list [id]="'trending'" [isAdmin]="isAdmin" [discoverType]="DiscoverType.Trending"></carousel-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>{{'Discovery.UpcomingTab' | translate}}</h2>
|
||||
<div>
|
||||
<carousel-list [id]="'upcoming'" [isAdmin]="isAdmin" [discoverType]="DiscoverType.Upcoming"></carousel-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>{{ 'Discovery.UpcomingTab' | translate }}</h2>
|
||||
<div>
|
||||
<carousel-list [id]="'upcoming'" [isAdmin]="isAdmin" [discoverType]="DiscoverType.Upcoming"></carousel-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,95 +1,124 @@
|
||||
<div *ngIf="issue">
|
||||
<div class="row issue-details">
|
||||
<div class="myBg backdrop" [style.background-image]="backgroundPath"></div>
|
||||
<div class="tint" style="background-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%,rgba(0,0,0,0.6) 100%);"></div>
|
||||
<h1>{{issue.title}} </h1>
|
||||
<div class="col-md-6">
|
||||
<img class="img-responsive poster" src="{{posterPath}}" alt="poster">
|
||||
<div class="row issue-details">
|
||||
<div class="myBg backdrop" [style.background-image]="backgroundPath"></div>
|
||||
<div class="tint" style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 100%)"></div>
|
||||
<h1>{{ issue.title }}</h1>
|
||||
<div class="col-md-6">
|
||||
<img class="img-responsive poster" src="{{ posterPath }}" alt="poster" />
|
||||
|
||||
<div class="issue-status">
|
||||
<span *ngIf="issue.status === IssueStatus.Pending" id="pendingLabel" class="label label-warning">{{IssueStatus[issue.status]}}</span>
|
||||
<span *ngIf="issue.status === IssueStatus.InProgress" id="inprogressLabel" class="label label-info">{{IssueStatus[issue.status]}}</span>
|
||||
<span *ngIf="issue.status === IssueStatus.Resolved" id="resolvedLabel" class="label label-success">{{IssueStatus[issue.status]}}</span>
|
||||
</div>
|
||||
<span class="label label-success">{{issue.issueCategory.value}}</span>
|
||||
<br>
|
||||
<span class="reported-by">
|
||||
<h3 *ngIf="issue.userReported?.alias">{{'Issues.ReportedBy' | translate}}:</h3>
|
||||
<h3 *ngIf="!issue.userReported?.alias">{{'Issues.ReportedBy' | translate}}:</h3>
|
||||
</span>
|
||||
<span class="reported-user">
|
||||
<h3 *ngIf="issue.userReported?.alias">{{issue.userReported.alias}}</h3>
|
||||
<h3 *ngIf="!issue.userReported?.alias">{{issue.userReported.userName}}</h3>
|
||||
</span>
|
||||
<br>
|
||||
<span class="subject-category"><h3 *ngIf="issue.subject">{{'Issues.Subject' | translate}}:</h3></span>
|
||||
<span class="subject"><h3 *ngIf="issue.subject">{{issue.subject}}</h3></span>
|
||||
<br>
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label" [translate]="'Issues.Description'"></label>
|
||||
<div>
|
||||
<textarea class="form-control-custom form-control" disabled="disabled" [(ngModel)]="issue.description" rows="5" type="text"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="issue-status">
|
||||
<span *ngIf="issue.status === IssueStatus.Pending" id="pendingLabel" class="label label-warning">{{
|
||||
IssueStatus[issue.status]
|
||||
}}</span>
|
||||
<span *ngIf="issue.status === IssueStatus.InProgress" id="inprogressLabel" class="label label-info">{{
|
||||
IssueStatus[issue.status]
|
||||
}}</span>
|
||||
<span *ngIf="issue.status === IssueStatus.Resolved" id="resolvedLabel" class="label label-success">{{
|
||||
IssueStatus[issue.status]
|
||||
}}</span>
|
||||
</div>
|
||||
<span class="label label-success">{{ issue.issueCategory.value }}</span>
|
||||
<br />
|
||||
<span class="reported-by">
|
||||
<h3 *ngIf="issue.userReported?.alias">{{ 'Issues.ReportedBy' | translate }}:</h3>
|
||||
<h3 *ngIf="!issue.userReported?.alias">{{ 'Issues.ReportedBy' | translate }}:</h3>
|
||||
</span>
|
||||
<span class="reported-user">
|
||||
<h3 *ngIf="issue.userReported?.alias">{{ issue.userReported.alias }}</h3>
|
||||
<h3 *ngIf="!issue.userReported?.alias">{{ issue.userReported.userName }}</h3>
|
||||
</span>
|
||||
<br />
|
||||
<span class="subject-category"
|
||||
><h3 *ngIf="issue.subject">{{ 'Issues.Subject' | translate }}:</h3></span
|
||||
>
|
||||
<span class="subject"
|
||||
><h3 *ngIf="issue.subject">{{ issue.subject }}</h3></span
|
||||
>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label" [translate]="'Issues.Description'"></label>
|
||||
<div>
|
||||
<textarea
|
||||
class="form-control-custom form-control"
|
||||
disabled="disabled"
|
||||
[(ngModel)]="issue.description"
|
||||
rows="5"
|
||||
type="text"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row chat-window col-xs-7 col-md-5" id="chat_window_1" style="margin-left: 10px">
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading top-bar">
|
||||
<div class="col-md-8 col-xs-8">
|
||||
<h3 class="panel-title"><span class="glyphicon glyphicon-comment"></span> {{ 'Issues.Comments' | translate }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="comments" class="panel-body msg_container_base">
|
||||
<div *ngIf="comments.length <= 0" class="row msg_container base_receive">
|
||||
<div class="col-md-10 col-xs-10">
|
||||
<div class="messages msg_sent">
|
||||
<p [translate]="'Issues.NoComments'"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div
|
||||
*ngFor="let comment of comments"
|
||||
class="row msg_container"
|
||||
[ngClass]="{ base_sent: comment.adminComment, base_receive: !comment.adminComment }"
|
||||
>
|
||||
<div class="col-md-10 col-xs-10">
|
||||
<div class="messages msg_sent">
|
||||
<i
|
||||
*ngIf="isAdmin"
|
||||
style="float: right"
|
||||
class="fas fa-times"
|
||||
aria-hidden="true"
|
||||
(click)="deleteComment(comment.id)"
|
||||
></i>
|
||||
<p>{{ comment.comment }}</p>
|
||||
<time>{{ comment.username }} • {{ comment.date | dfnsFormat: 'Ppp' }}</time>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="input-group">
|
||||
<input
|
||||
id="btn-input"
|
||||
type="text"
|
||||
class="form-control input-sm chat_input"
|
||||
[(ngModel)]="newComment.comment"
|
||||
[attr.placeholder]="'Issues.WriteMessagePlaceholder' | translate"
|
||||
/>
|
||||
<span class="input-group-btn">
|
||||
<button
|
||||
class="btn btn-primary btn-sm"
|
||||
id="btn-chat"
|
||||
(click)="addComment()"
|
||||
[translate]="'Issues.SendMessageButton'"
|
||||
></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row chat-window col-xs-7 col-md-5" id="chat_window_1" style="margin-left:10px;">
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading top-bar">
|
||||
<div class="col-md-8 col-xs-8">
|
||||
<h3 class="panel-title">
|
||||
<span class="glyphicon glyphicon-comment"></span> {{'Issues.Comments' | translate}}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="comments" class="panel-body msg_container_base">
|
||||
<div *ngIf="comments.length <= 0" class="row msg_container base_receive">
|
||||
<div class="col-md-10 col-xs-10">
|
||||
|
||||
<div class="messages msg_sent">
|
||||
<p [translate]="'Issues.NoComments'"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let comment of comments" class="row msg_container" [ngClass]="{'base_sent': comment.adminComment, 'base_receive': !comment.adminComment}">
|
||||
<div class="col-md-10 col-xs-10">
|
||||
|
||||
<div class="messages msg_sent"> <i *ngIf="isAdmin" style="float:right;" class="fas fa-times" aria-hidden="true" (click)="deleteComment(comment.id)"></i>
|
||||
<p>{{comment.comment}}</p>
|
||||
<time>{{comment.username}} • {{comment.date | amFromUtc | amLocal | amUserLocale | amDateFormat: 'l LT'}}</time>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="input-group">
|
||||
<input id="btn-input" type="text" class="form-control input-sm chat_input" [(ngModel)]="newComment.comment" [attr.placeholder]="'Issues.WriteMessagePlaceholder' | translate" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary btn-sm" id="btn-chat" (click)="addComment()" [translate]="'Issues.SendMessageButton'"></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div *ngIf="isAdmin && settings">
|
||||
<div *ngIf="issue.status === IssueStatus.Pending && settings.enableInProgress">
|
||||
<button class="btn btn-primary btn-sm bottom-btn" (click)="inProgress()">{{'Issues.MarkInProgress' | translate }}</button>
|
||||
</div>
|
||||
<div *ngIf="issue.status === IssueStatus.Pending && !settings.enableInProgress || issue.status == IssueStatus.InProgress">
|
||||
<button class="btn btn-primary btn-sm bottom-btn" (click)="resolve()" [translate]="'Issues.MarkResolved'"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div *ngIf="isAdmin && settings">
|
||||
<div *ngIf="issue.status === IssueStatus.Pending && settings.enableInProgress">
|
||||
<button class="btn btn-primary btn-sm bottom-btn" (click)="inProgress()">{{ 'Issues.MarkInProgress' | translate }}</button>
|
||||
</div>
|
||||
<div *ngIf="(issue.status === IssueStatus.Pending && !settings.enableInProgress) || issue.status == IssueStatus.InProgress">
|
||||
<button class="btn btn-primary btn-sm bottom-btn" (click)="resolve()" [translate]="'Issues.MarkResolved'"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,300 +1,408 @@
|
||||
<div *ngIf="!movie" class="justify-content-md-center top-spacing loading-spinner">
|
||||
<mat-spinner [color]="'accent'"></mat-spinner>
|
||||
<mat-spinner [color]="'accent'"></mat-spinner>
|
||||
</div>
|
||||
|
||||
<div *ngIf="movie" class="main-content-container">
|
||||
<top-banner
|
||||
[background]="movie.background"
|
||||
[available]="movie.available"
|
||||
[title]="movie.title"
|
||||
[releaseDate]="movie.releaseDate"
|
||||
[tagline]="movie.tagline"
|
||||
></top-banner>
|
||||
<div class="social-icons-container">
|
||||
<social-icons
|
||||
[homepage]="movie.homepage"
|
||||
[theMoviedbId]="movie.id"
|
||||
[hasTrailer]="movie.videos?.results?.length > 0"
|
||||
[imdbId]="movie.imdbId"
|
||||
[twitter]="movie.externalIds?.twitterId"
|
||||
[facebook]="movie.externalIds?.facebookId"
|
||||
[instagram]="movie.externalIds?.instagramId"
|
||||
[available]="movie.available"
|
||||
[isAdmin]="isAdmin"
|
||||
[canShowAdvanced]="showAdvanced && movieRequest"
|
||||
[type]="requestType"
|
||||
[has4KRequest]="movie.has4KRequest"
|
||||
(openTrailer)="openDialog()"
|
||||
(onAdvancedOptions)="openAdvancedOptions()"
|
||||
(onReProcessRequest)="reProcessRequest(false)"
|
||||
(onReProcess4KRequest)="reProcessRequest(true)"
|
||||
>
|
||||
</social-icons>
|
||||
</div>
|
||||
<section id="info-wrapper">
|
||||
<div class="small-middle-container">
|
||||
<div class="row justify-content-center justify-content-sm-start header-container">
|
||||
<div class="details-poster-container">
|
||||
<media-poster [posterPath]="movie.posterPath"></media-poster>
|
||||
</div>
|
||||
|
||||
<top-banner [background]="movie.background" [available]="movie.available" [title]="movie.title"
|
||||
[releaseDate]="movie.releaseDate" [tagline]="movie.tagline"></top-banner>
|
||||
<div class="social-icons-container">
|
||||
<!--Next to poster-->
|
||||
<div class="details-button-container">
|
||||
<div class="col-12 media-row">
|
||||
<span *ngIf="movie.available || movie.available4K">
|
||||
<a
|
||||
id="viewOnPlexButton"
|
||||
*ngIf="movie.plexUrl"
|
||||
href="{{ movie.plexUrl }}"
|
||||
mat-raised-button
|
||||
target="_blank"
|
||||
class="btn-spacing viewon-btn plex"
|
||||
>
|
||||
{{ 'Search.ViewOnPlex' | translate }}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a
|
||||
id="viewOnEmbyButton"
|
||||
*ngIf="movie.embyUrl"
|
||||
href="{{ movie.embyUrl }}"
|
||||
mat-raised-button
|
||||
target="_blank"
|
||||
class="btn-spacing viewon-btn emby"
|
||||
>
|
||||
{{ 'Search.ViewOnEmby' | translate }}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a
|
||||
id="viewOnJellyfinButton"
|
||||
*ngIf="movie.jellyfinUrl"
|
||||
href="{{ movie.jellyfinUrl }}"
|
||||
mat-raised-button
|
||||
target="_blank"
|
||||
class="btn-spacing viewon-btn jellyfin"
|
||||
>
|
||||
{{ 'Search.ViewOnJellyfin' | translate }}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
</span>
|
||||
<!-- Regular Movie Status -->
|
||||
<button
|
||||
mat-raised-button
|
||||
class="btn-green btn-spacing"
|
||||
id="availableBtn"
|
||||
*ngIf="movie.available && !movie.plexUrl && !movie.embyUrl && !movie.jellyfinUrl"
|
||||
>
|
||||
{{ 'Common.Available' | translate }}
|
||||
</button>
|
||||
<span *ngIf="!movie.available">
|
||||
<span *ngIf="movie.requested || movie.approved; then requestedBtn; else notRequestedBtn"></span>
|
||||
<ng-template #requestedBtn>
|
||||
<button
|
||||
id="requestedBtn"
|
||||
mat-raised-button
|
||||
*ngIf="!hasRequest || (hasRequest && movieRequest && !movieRequest.denied)"
|
||||
class="btn-spacing"
|
||||
color="warn"
|
||||
[disabled]
|
||||
>
|
||||
<i class="fas fa-check"></i>
|
||||
{{ 'Common.Requested' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
<ng-template #notRequestedBtn>
|
||||
<button
|
||||
*ngIf="!movie.requested"
|
||||
id="requestBtn"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="primary"
|
||||
(click)="request(false)"
|
||||
>
|
||||
<i *ngIf="movie.requestProcessing" class="fas fa-circle-notch fa-spin fa-fw"></i>
|
||||
<i *ngIf="!movie.requestProcessing && !movie.processed" class="fas fa-plus"></i>
|
||||
<i *ngIf="movie.processed && !movie.requestProcessing" class="fas fa-check"></i>
|
||||
{{ 'Common.Request' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</span>
|
||||
|
||||
<social-icons [homepage]="movie.homepage" [theMoviedbId]="movie.id"
|
||||
[hasTrailer]="movie.videos?.results?.length > 0" [imdbId]="movie.imdbId"
|
||||
[twitter]="movie.externalIds?.twitterId" [facebook]="movie.externalIds?.facebookId"
|
||||
[instagram]="movie.externalIds?.instagramId" [available]="movie.available" [isAdmin]="isAdmin"
|
||||
[canShowAdvanced]="showAdvanced && movieRequest" [type]="requestType" [has4KRequest]="movie.has4KRequest"
|
||||
(openTrailer)="openDialog()" (onAdvancedOptions)="openAdvancedOptions()"
|
||||
(onReProcessRequest)="reProcessRequest(false)" (onReProcess4KRequest)="reProcessRequest(true)">
|
||||
</social-icons>
|
||||
<!-- 4k Status -->
|
||||
<span *ngIf="is4KEnabled">
|
||||
<span *permission="roleName4k">
|
||||
<button mat-raised-button class="btn-green btn-spacing" id="availableBtn4k" *ngIf="movie.available4K">
|
||||
{{ 'Common.Available4K' | translate }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<section id="info-wrapper">
|
||||
<div class="small-middle-container">
|
||||
<span *ngIf="!movie.available4K">
|
||||
<span *ngIf="movie.has4KRequest || movie.approved4K; then requestedBtn4K; else notRequestedBtn4K"></span>
|
||||
<ng-template #requestedBtn4K>
|
||||
<button
|
||||
id="requestedBtn4K"
|
||||
mat-raised-button
|
||||
*ngIf="movieRequest && !movieRequest.denied4K"
|
||||
class="btn-spacing"
|
||||
color="warn"
|
||||
[disabled]
|
||||
>
|
||||
<i class="fas fa-check"></i>
|
||||
{{ 'Common.Requested4K' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
<ng-template #notRequestedBtn4K>
|
||||
<button
|
||||
*ngIf="!movie.has4KRequest"
|
||||
id="requestBtn4k"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="primary"
|
||||
(click)="request(true)"
|
||||
>
|
||||
<i *ngIf="movie.requestProcessing" class="fas fa-circle-notch fa-spin fa-fw"></i>
|
||||
<i *ngIf="!movie.requestProcessing && !movie.processed" class="fas fa-plus"></i>
|
||||
<i *ngIf="movie.processed && !movie.requestProcessing" class="fas fa-check"></i>
|
||||
{{ 'Common.Request4K' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div class="row justify-content-center justify-content-sm-start header-container">
|
||||
<div class="details-poster-container">
|
||||
<media-poster [posterPath]=movie.posterPath></media-poster>
|
||||
</div>
|
||||
<span *ngIf="movieRequest?.showSubscribe">
|
||||
<button *ngIf="!movieRequest?.subscribed" (click)="notify()" id="notifyBtn" mat-raised-button class="btn-spacing">
|
||||
<i class="fas fa-bell"></i> {{ 'Requests.Notify' | translate }}
|
||||
</button>
|
||||
<button *ngIf="movieRequest?.subscribed" (click)="unNotify()" id="unnotifyBtn" mat-raised-button class="btn-spacing">
|
||||
<i class="fas fa-bell-slash"></i> {{ 'Requests.RemoveNotification' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
|
||||
<!--Next to poster-->
|
||||
<div class="details-button-container">
|
||||
<div class="col-12 media-row">
|
||||
<span *ngIf="movie.available || movie.available4K">
|
||||
<a id="viewOnPlexButton" *ngIf="movie.plexUrl" href="{{movie.plexUrl}}" mat-raised-button
|
||||
target="_blank" class="btn-spacing viewon-btn plex">
|
||||
{{'Search.ViewOnPlex' | translate}}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a id="viewOnEmbyButton" *ngIf="movie.embyUrl" href="{{movie.embyUrl}}" mat-raised-button
|
||||
target="_blank" class="btn-spacing viewon-btn emby">
|
||||
{{'Search.ViewOnEmby' | translate}}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a id="viewOnJellyfinButton" *ngIf="movie.jellyfinUrl" href="{{movie.jellyfinUrl}}"
|
||||
mat-raised-button target="_blank" class="btn-spacing viewon-btn jellyfin">
|
||||
{{'Search.ViewOnJellyfin' | translate}}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
</span>
|
||||
<!-- Regular Movie Status -->
|
||||
<button mat-raised-button class="btn-green btn-spacing" id="availableBtn"
|
||||
*ngIf="movie.available && !movie.plexUrl && !movie.embyUrl && !movie.jellyfinUrl"> {{
|
||||
'Common.Available' | translate }}</button>
|
||||
<span *ngIf="!movie.available">
|
||||
<span
|
||||
*ngIf="movie.requested || movie.approved; then requestedBtn else notRequestedBtn"></span>
|
||||
<ng-template #requestedBtn>
|
||||
<button id="requestedBtn" mat-raised-button
|
||||
*ngIf="!hasRequest || hasRequest && movieRequest && !movieRequest.denied"
|
||||
class="btn-spacing" color="warn" [disabled]>
|
||||
<i class="fas fa-check"></i>
|
||||
{{ 'Common.Requested' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
<ng-template #notRequestedBtn>
|
||||
<button *ngIf="!movie.requested" id="requestBtn" mat-raised-button class="btn-spacing"
|
||||
color="primary" (click)="request(false)">
|
||||
<i *ngIf="movie.requestProcessing" class="fas fa-circle-notch fa-spin fa-fw"></i>
|
||||
<i *ngIf="!movie.requestProcessing && !movie.processed" class="fas fa-plus"></i>
|
||||
<i *ngIf="movie.processed && !movie.requestProcessing" class="fas fa-check"></i>
|
||||
{{'Common.Request' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</span>
|
||||
<span *ngIf="isAdmin && hasRequest">
|
||||
<button
|
||||
id="approveBtn"
|
||||
*ngIf="!movie.approved && movie.requested"
|
||||
(click)="approve(false)"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
>
|
||||
<i class="fas fa-plus"></i> {{ 'Common.Approve' | translate }}
|
||||
</button>
|
||||
<button
|
||||
id="markAvailableBtn"
|
||||
*ngIf="!movie.available && movie.requested"
|
||||
(click)="markAvailable(false)"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
>
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
|
||||
</button>
|
||||
<button
|
||||
id="markUnavailableBtn"
|
||||
*ngIf="movie.available && movie.requested"
|
||||
(click)="markUnavailable(false)"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
>
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable' | translate }}
|
||||
</button>
|
||||
|
||||
<!-- 4k Status -->
|
||||
<span *ngIf="is4KEnabled">
|
||||
<span *permission="roleName4k">
|
||||
<button mat-raised-button class="btn-green btn-spacing" id="availableBtn4k"
|
||||
*ngIf="movie.available4K"> {{
|
||||
'Common.Available4K' | translate }}
|
||||
</button>
|
||||
<!-- 4k -->
|
||||
<span *ngIf="is4KEnabled">
|
||||
<span *permission="roleName4k">
|
||||
<button
|
||||
id="approve4kBtn"
|
||||
*ngIf="!movie.approved4K && movie.has4KRequest"
|
||||
(click)="approve(true)"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
>
|
||||
<i class="fas fa-plus"></i> {{ 'Common.Approve4K' | translate }}
|
||||
</button>
|
||||
<button
|
||||
id="markAvailable4kBtn"
|
||||
*ngIf="!movie.available4K && movie.has4KRequest"
|
||||
(click)="markAvailable(true)"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
>
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable4K' | translate }}
|
||||
</button>
|
||||
<button
|
||||
id="markUnavailable4kBtn"
|
||||
*ngIf="movie.available4K"
|
||||
(click)="markUnavailable(true)"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
>
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable4K' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span *ngIf="!movie.available4K">
|
||||
<span
|
||||
*ngIf="movie.has4KRequest || movie.approved4K; then requestedBtn4K else notRequestedBtn4K"></span>
|
||||
<ng-template #requestedBtn4K>
|
||||
<button id="requestedBtn4K" mat-raised-button
|
||||
*ngIf="movieRequest && !movieRequest.denied4K" class="btn-spacing"
|
||||
color="warn" [disabled]>
|
||||
<i class="fas fa-check"></i>
|
||||
{{ 'Common.Requested4K' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
<ng-template #notRequestedBtn4K>
|
||||
<button *ngIf="!movie.has4KRequest" id="requestBtn4k" mat-raised-button
|
||||
class="btn-spacing" color="primary" (click)="request(true)">
|
||||
<i *ngIf="movie.requestProcessing"
|
||||
class="fas fa-circle-notch fa-spin fa-fw"></i>
|
||||
<i *ngIf="!movie.requestProcessing && !movie.processed"
|
||||
class="fas fa-plus"></i>
|
||||
<i *ngIf="movie.processed && !movie.requestProcessing"
|
||||
class="fas fa-check"></i>
|
||||
{{'Common.Request4K' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<button
|
||||
id="denyBtn"
|
||||
*ngIf="!movieRequest.denied && movie.requested"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="warn"
|
||||
(click)="deny(false)"
|
||||
>
|
||||
<i class="fas fa-times"></i> {{ 'Requests.Deny' | translate }}
|
||||
</button>
|
||||
|
||||
<span *ngIf="movieRequest?.showSubscribe">
|
||||
<button *ngIf="!movieRequest?.subscribed" (click)="notify()" id="notifyBtn"
|
||||
mat-raised-button class="btn-spacing"> <i class="fas fa-bell"></i>
|
||||
{{ 'Requests.Notify' | translate }}</button>
|
||||
<button *ngIf="movieRequest?.subscribed" (click)="unNotify()" id="unnotifyBtn"
|
||||
mat-raised-button class="btn-spacing"> <i class="fas fa-bell-slash"></i>
|
||||
{{ 'Requests.RemoveNotification' | translate }}</button>
|
||||
</span>
|
||||
<button
|
||||
id="deniedButton"
|
||||
*ngIf="movieRequest && movieRequest.denied"
|
||||
[matTooltip]="movieRequest.deniedReason"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="warn"
|
||||
>
|
||||
<i class="fas fa-times"></i> {{ 'MediaDetails.Denied' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
|
||||
<span *ngIf="isAdmin && hasRequest">
|
||||
<button id="approveBtn" *ngIf="!movie.approved && movie.requested" (click)="approve(false)"
|
||||
mat-raised-button class="btn-spacing" color="accent">
|
||||
<i class="fas fa-plus"></i> {{ 'Common.Approve' | translate }}
|
||||
</button>
|
||||
<button id="markAvailableBtn" *ngIf="!movie.available && movie.requested"
|
||||
(click)="markAvailable(false)" mat-raised-button class="btn-spacing" color="accent">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
|
||||
</button>
|
||||
<button id="markUnavailableBtn" *ngIf="movie.available && movie.requested"
|
||||
(click)="markUnavailable(false)" mat-raised-button class="btn-spacing" color="accent">
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable' | translate }}
|
||||
</button>
|
||||
<button id="reportIssueBtn" mat-raised-button class="btn-spacing" color="danger" (click)="issue()" *ngIf="issuesEnabled">
|
||||
<i class="fas fa-exclamation"></i> {{ 'Requests.ReportIssue' | translate }}
|
||||
</button>
|
||||
<button
|
||||
id="viewCollectionBtn"
|
||||
*ngIf="movie.belongsToCollection"
|
||||
[routerLink]="'/discover/collection/' + movie.belongsToCollection.id"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
>
|
||||
<i class="fas fa-list"></i> {{ 'MediaDetails.ViewCollection' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 4k -->
|
||||
<span *ngIf="is4KEnabled">
|
||||
<span *permission="roleName4k">
|
||||
<button id="approve4kBtn" *ngIf="!movie.approved4K && movie.has4KRequest"
|
||||
(click)="approve(true)" mat-raised-button class="btn-spacing" color="accent">
|
||||
<i class="fas fa-plus"></i> {{ 'Common.Approve4K' | translate }}
|
||||
</button>
|
||||
<button id="markAvailable4kBtn" *ngIf="!movie.available4K && movie.has4KRequest"
|
||||
(click)="markAvailable(true)" mat-raised-button class="btn-spacing"
|
||||
color="accent">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable4K' | translate }}
|
||||
</button>
|
||||
<button id="markUnavailable4kBtn" *ngIf="movie.available4K"
|
||||
(click)="markUnavailable(true)" mat-raised-button class="btn-spacing"
|
||||
color="accent">
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable4K' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2">
|
||||
<mat-card class="mat-elevation-z8">
|
||||
<mat-card-content>
|
||||
<movie-information-panel
|
||||
[movie]="movie"
|
||||
[request]="movieRequest"
|
||||
[advancedOptions]="showAdvanced"
|
||||
></movie-information-panel>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
<button id="denyBtn" *ngIf="!movieRequest.denied && movie.requested" mat-raised-button
|
||||
class="btn-spacing" color="warn" (click)="deny(false)">
|
||||
<i class="fas fa-times"></i> {{'Requests.Deny' | translate }}
|
||||
</button>
|
||||
<div class="col-12 col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<mat-card class="mat-elevation-z8 spacing-below">
|
||||
<mat-card-content>
|
||||
{{ movie.overview }}
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="deniedButton" *ngIf="movieRequest && movieRequest.denied"
|
||||
[matTooltip]="movieRequest.deniedReason" mat-raised-button class="btn-spacing"
|
||||
color="warn">
|
||||
<i class="fas fa-times"></i> {{'MediaDetails.Denied' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<cast-carousel [cast]="movie.credits.cast"></cast-carousel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="reportIssueBtn" mat-raised-button class="btn-spacing" color="danger"
|
||||
(click)="issue()" *ngIf="issuesEnabled">
|
||||
<i class="fas fa-exclamation"></i> {{'Requests.ReportIssue' | translate }}
|
||||
</button>
|
||||
<button id="viewCollectionBtn" *ngIf="movie.belongsToCollection"
|
||||
[routerLink]="'/discover/collection/' + movie.belongsToCollection.id" mat-raised-button
|
||||
class="btn-spacing">
|
||||
<i class="fas fa-list"></i> {{'MediaDetails.ViewCollection' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<crew-carousel [crew]="movie.credits.crew"></crew-carousel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2">
|
||||
<mat-card class="mat-elevation-z8">
|
||||
<mat-card-content>
|
||||
<movie-information-panel [movie]="movie" [request]="movieRequest"
|
||||
[advancedOptions]="showAdvanced"></movie-information-panel>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<mat-card class=" mat-elevation-z8 spacing-below">
|
||||
<mat-card-content>
|
||||
{{movie.overview}}
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<cast-carousel [cast]="movie.credits.cast"></cast-carousel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<crew-carousel [crew]="movie.credits.crew"></crew-carousel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="row card-spacer" *ngIf="movie.videos?.results?.length > 0">
|
||||
<!-- <div class="row card-spacer" *ngIf="movie.videos?.results?.length > 0">
|
||||
|
||||
<div class="col-md-6" *ngFor="let video of movie.videos?.results">
|
||||
<iframe width="100%" height="315px" [src]="'https://www.youtube.com/embed/' + video.key | safe" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row" *ngIf="movie.videos?.results?.length > 0">
|
||||
<div class="col-12">
|
||||
<mat-card class="mat-elevation-z8">
|
||||
<mat-card-header>{{'MediaDetails.Trailers' | translate}}</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p-carousel class="no-indicator" [numVisible]="2" [numScroll]="10" [page]="0"
|
||||
[value]="movie.videos?.results">
|
||||
<ng-template let-result pTemplate="item">
|
||||
<iframe width="98%" height="315px"
|
||||
[src]="'https://www.youtube.com/embed/' + result.key | safe"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen></iframe>
|
||||
</ng-template>
|
||||
</p-carousel>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="issuesPanel">
|
||||
<issues-panel [providerId]="movie.imdbId" [isAdmin]="isAdmin"></issues-panel>
|
||||
</div>
|
||||
|
||||
<mat-accordion class=" mat-elevation-z8 spacing-below ">
|
||||
<mat-expansion-panel *ngIf="movie.recommendations?.results?.length> 0">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{'MediaDetails.RecommendationsTitle' | translate}}
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<div class="row" *ngIf="movie.videos?.results?.length > 0">
|
||||
<div class="col-12">
|
||||
<mat-card class="mat-elevation-z8">
|
||||
<mat-card-header>{{ 'MediaDetails.Trailers' | translate }}</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p-carousel class="no-indicator" [numVisible]="2" [numScroll]="10" [page]="0" [value]="movie.videos?.results">
|
||||
<ng-template let-result pTemplate="item">
|
||||
<iframe
|
||||
width="98%"
|
||||
height="315px"
|
||||
[src]="'https://www.youtube.com/embed/' + result.key | safe"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</ng-template>
|
||||
</p-carousel>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row card-spacer ">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="issuesPanel">
|
||||
<issues-panel [providerId]="movie.imdbId" [isAdmin]="isAdmin"></issues-panel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" *ngFor="let r of movie.recommendations?.results">
|
||||
<div class="sidebar affixable affix-top preview-poster">
|
||||
<div class="poster">
|
||||
<a [routerLink]="'/details/movie/'+r.id">
|
||||
<ombi-image class="real grow" matTooltip="{{r.title}}"
|
||||
src="https://image.tmdb.org/t/p/w300/{{r.poster_path}}"
|
||||
alt="Poster" style="display: block;"> </ombi-image>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
<mat-expansion-panel *ngIf="movie.similar?.results?.length > 0">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{'MediaDetails.SimilarTitle' | translate}}
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-accordion class="mat-elevation-z8 spacing-below">
|
||||
<mat-expansion-panel *ngIf="movie.recommendations?.results?.length > 0">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ 'MediaDetails.RecommendationsTitle' | translate }}
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<div class="row card-spacer">
|
||||
<div class="row card-spacer">
|
||||
<div class="col-md-2" *ngFor="let r of movie.recommendations?.results">
|
||||
<div class="sidebar affixable affix-top preview-poster">
|
||||
<div class="poster">
|
||||
<a [routerLink]="'/details/movie/' + r.id">
|
||||
<ombi-image
|
||||
class="real grow"
|
||||
matTooltip="{{ r.title }}"
|
||||
src="https://image.tmdb.org/t/p/w300/{{ r.poster_path }}"
|
||||
alt="Poster"
|
||||
style="display: block"
|
||||
>
|
||||
</ombi-image>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
<mat-expansion-panel *ngIf="movie.similar?.results?.length > 0">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ 'MediaDetails.SimilarTitle' | translate }}
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<div class="col-md-2" *ngFor="let r of movie.similar.results">
|
||||
<div class="sidebar affixable affix-top preview-poster">
|
||||
<div class="poster ">
|
||||
<a [routerLink]="'/details/movie/'+r.id">
|
||||
<ombi-image class="real grow" matTooltip="{{r.title}}"
|
||||
src="https://image.tmdb.org/t/p/w300/{{r.poster_path}}"
|
||||
alt="Poster" style="display: block;"></ombi-image>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-page-gap">
|
||||
</div>
|
||||
</section>
|
||||
<div class="row card-spacer">
|
||||
<div class="col-md-2" *ngFor="let r of movie.similar.results">
|
||||
<div class="sidebar affixable affix-top preview-poster">
|
||||
<div class="poster">
|
||||
<a [routerLink]="'/details/movie/' + r.id">
|
||||
<ombi-image
|
||||
class="real grow"
|
||||
matTooltip="{{ r.title }}"
|
||||
src="https://image.tmdb.org/t/p/w300/{{ r.poster_path }}"
|
||||
alt="Poster"
|
||||
style="display: block"
|
||||
></ombi-image>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-page-gap"></div>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -1,336 +1,376 @@
|
||||
import { Component, OnInit, ViewEncapsulation } from "@angular/core";
|
||||
import { ImageService, SearchV2Service, RequestService, MessageService, RadarrService, SettingsStateService } from "../../../services";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { DomSanitizer } from "@angular/platform-browser";
|
||||
import { ICrewViewModel, ISearchMovieResultV2 } from "../../../interfaces/ISearchMovieResultV2";
|
||||
import { MatDialog } from "@angular/material/dialog";
|
||||
import { YoutubeTrailerComponent } from "../shared/youtube-trailer.component";
|
||||
import { AuthService } from "../../../auth/auth.service";
|
||||
import { IMovieRequests, RequestType, IAdvancedData } from "../../../interfaces";
|
||||
import { DenyDialogComponent } from "../shared/deny-dialog/deny-dialog.component";
|
||||
import { NewIssueComponent } from "../shared/new-issue/new-issue.component";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
import { MovieAdvancedOptionsComponent } from "./panels/movie-advanced-options/movie-advanced-options.component";
|
||||
import { RequestServiceV2 } from "../../../services/requestV2.service";
|
||||
import { firstValueFrom, forkJoin } from "rxjs";
|
||||
import { AdminRequestDialogComponent } from "../../../shared/admin-request-dialog/admin-request-dialog.component";
|
||||
import { FeaturesFacade } from "../../../state/features/features.facade";
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ImageService, SearchV2Service, RequestService, MessageService, RadarrService, SettingsStateService } from '../../../services';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { ICrewViewModel, ISearchMovieResultV2 } from '../../../interfaces/ISearchMovieResultV2';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { YoutubeTrailerComponent } from '../shared/youtube-trailer.component';
|
||||
import { AuthService } from '../../../auth/auth.service';
|
||||
import { IMovieRequests, RequestType, IAdvancedData } from '../../../interfaces';
|
||||
import { DenyDialogComponent } from '../shared/deny-dialog/deny-dialog.component';
|
||||
import { NewIssueComponent } from '../shared/new-issue/new-issue.component';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { MovieAdvancedOptionsComponent } from './panels/movie-advanced-options/movie-advanced-options.component';
|
||||
import { RequestServiceV2 } from '../../../services/requestV2.service';
|
||||
import { firstValueFrom, forkJoin } from 'rxjs';
|
||||
import { AdminRequestDialogComponent } from '../../../shared/admin-request-dialog/admin-request-dialog.component';
|
||||
import { FeaturesFacade } from '../../../state/features/features.facade';
|
||||
|
||||
@Component({
|
||||
templateUrl: "./movie-details.component.html",
|
||||
styleUrls: ["../../media-details.component.scss"],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
templateUrl: './movie-details.component.html',
|
||||
styleUrls: ['../../media-details.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class MovieDetailsComponent implements OnInit{
|
||||
public movie: ISearchMovieResultV2;
|
||||
public hasRequest: boolean;
|
||||
public movieRequest: IMovieRequests;
|
||||
public isAdmin: boolean;
|
||||
public advancedOptions: IAdvancedData;
|
||||
public showAdvanced: boolean; // Set on the UI
|
||||
public issuesEnabled: boolean;
|
||||
public roleName4k = "Request4KMovie";
|
||||
public is4KEnabled = false;
|
||||
public requestType = RequestType.movie;
|
||||
private theMovidDbId: number;
|
||||
private imdbId: string;
|
||||
private snapMovieId: string;
|
||||
export class MovieDetailsComponent implements OnInit {
|
||||
public movie: ISearchMovieResultV2;
|
||||
public hasRequest: boolean;
|
||||
public movieRequest: IMovieRequests;
|
||||
public isAdmin: boolean;
|
||||
public advancedOptions: IAdvancedData;
|
||||
public showAdvanced: boolean; // Set on the UI
|
||||
public issuesEnabled: boolean;
|
||||
public roleName4k = 'Request4KMovie';
|
||||
public is4KEnabled = false;
|
||||
public requestType = RequestType.movie;
|
||||
private theMovidDbId: number;
|
||||
private imdbId: string;
|
||||
private snapMovieId: string;
|
||||
|
||||
constructor(
|
||||
private searchService: SearchV2Service,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private sanitizer: DomSanitizer,
|
||||
private imageService: ImageService,
|
||||
public dialog: MatDialog,
|
||||
private requestService: RequestService,
|
||||
private requestService2: RequestServiceV2,
|
||||
private radarrService: RadarrService,
|
||||
public messageService: MessageService,
|
||||
private auth: AuthService,
|
||||
private settingsState: SettingsStateService,
|
||||
private translate: TranslateService,
|
||||
private featureFacade: FeaturesFacade,
|
||||
) {
|
||||
this.snapMovieId = this.route.snapshot.params.movieDbId;
|
||||
this.route.params.subscribe(async (params: any) => {
|
||||
if (typeof params.movieDbId === 'string' || params.movieDbId instanceof String) {
|
||||
if (params.movieDbId.startsWith('tt')) {
|
||||
this.imdbId = params.movieDbId;
|
||||
// Check if we user navigated to another movie and if so reload the component
|
||||
if (this.imdbId !== this.snapMovieId) {
|
||||
this.reloadComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.theMovidDbId = params.movieDbId;
|
||||
// Check if we user navigated to another movie and if so reload the component
|
||||
if (params.movieDbId !== this.snapMovieId) {
|
||||
this.reloadComponent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
constructor(private searchService: SearchV2Service, private route: ActivatedRoute, private router: Router,
|
||||
private sanitizer: DomSanitizer, private imageService: ImageService,
|
||||
public dialog: MatDialog, private requestService: RequestService,
|
||||
private requestService2: RequestServiceV2, private radarrService: RadarrService,
|
||||
public messageService: MessageService, private auth: AuthService, private settingsState: SettingsStateService,
|
||||
private translate: TranslateService, private featureFacade: FeaturesFacade) {
|
||||
this.snapMovieId = this.route.snapshot.params.movieDbId;
|
||||
this.route.params.subscribe(async (params: any) => {
|
||||
if (typeof params.movieDbId === 'string' || params.movieDbId instanceof String) {
|
||||
if (params.movieDbId.startsWith("tt")) {
|
||||
this.imdbId = params.movieDbId;
|
||||
// Check if we user navigated to another movie and if so reload the component
|
||||
if (this.imdbId !== this.snapMovieId) {
|
||||
this.reloadComponent()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.theMovidDbId = params.movieDbId;
|
||||
// Check if we user navigated to another movie and if so reload the component
|
||||
if (params.movieDbId !== this.snapMovieId) {
|
||||
this.reloadComponent()
|
||||
}
|
||||
});
|
||||
}
|
||||
reloadComponent() {
|
||||
let currentUrl = this.router.url;
|
||||
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||
this.router.onSameUrlNavigation = 'reload';
|
||||
this.router.navigate([currentUrl]);
|
||||
}
|
||||
|
||||
reloadComponent() {
|
||||
let currentUrl = this.router.url;
|
||||
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||
this.router.onSameUrlNavigation = 'reload';
|
||||
this.router.navigate([currentUrl]);
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.is4KEnabled = this.featureFacade.is4kEnabled();
|
||||
this.issuesEnabled = this.settingsState.getIssue();
|
||||
this.isAdmin = this.auth.hasRole('admin') || this.auth.hasRole('poweruser');
|
||||
|
||||
async ngOnInit() {
|
||||
this.is4KEnabled = this.featureFacade.is4kEnabled();
|
||||
this.issuesEnabled = this.settingsState.getIssue();
|
||||
this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser");
|
||||
if (this.isAdmin) {
|
||||
this.showAdvanced = await firstValueFrom(this.radarrService.isRadarrEnabled());
|
||||
}
|
||||
|
||||
if (this.isAdmin) {
|
||||
this.showAdvanced = await firstValueFrom(this.radarrService.isRadarrEnabled());
|
||||
}
|
||||
if (this.imdbId) {
|
||||
this.searchService.getMovieByImdbId(this.imdbId).subscribe(async (x) => {
|
||||
this.movie = x;
|
||||
this.checkPoster();
|
||||
this.movie.credits.crew = this.orderCrew(this.movie.credits.crew);
|
||||
if (this.movie.requestId > 0) {
|
||||
// Load up this request
|
||||
this.hasRequest = true;
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
}
|
||||
this.loadBanner();
|
||||
});
|
||||
} else {
|
||||
this.searchService.getFullMovieDetails(this.theMovidDbId).subscribe(async (x) => {
|
||||
this.movie = x;
|
||||
this.checkPoster();
|
||||
this.movie.credits.crew = this.orderCrew(this.movie.credits.crew);
|
||||
if (this.movie.requestId > 0) {
|
||||
// Load up this request
|
||||
this.hasRequest = true;
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
this.loadAdvancedInfo();
|
||||
}
|
||||
this.loadBanner();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (this.imdbId) {
|
||||
this.searchService.getMovieByImdbId(this.imdbId).subscribe(async x => {
|
||||
this.movie = x;
|
||||
this.checkPoster();
|
||||
this.movie.credits.crew = this.orderCrew(this.movie.credits.crew);
|
||||
if (this.movie.requestId > 0) {
|
||||
// Load up this request
|
||||
this.hasRequest = true;
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
}
|
||||
this.loadBanner();
|
||||
});
|
||||
} else {
|
||||
this.searchService.getFullMovieDetails(this.theMovidDbId).subscribe(async x => {
|
||||
this.movie = x;
|
||||
this.checkPoster();
|
||||
this.movie.credits.crew = this.orderCrew(this.movie.credits.crew);
|
||||
if (this.movie.requestId > 0) {
|
||||
// Load up this request
|
||||
this.hasRequest = true;
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
this.loadAdvancedInfo();
|
||||
}
|
||||
this.loadBanner();
|
||||
});
|
||||
}
|
||||
}
|
||||
public async request(is4K: boolean, userId?: string) {
|
||||
if (!this.is4KEnabled) {
|
||||
is4K = false;
|
||||
}
|
||||
if (this.isAdmin) {
|
||||
const dialog = this.dialog.open(AdminRequestDialogComponent, {
|
||||
width: '700px',
|
||||
data: { type: RequestType.movie, id: this.movie.id, is4K: is4K },
|
||||
panelClass: 'modal-panel',
|
||||
});
|
||||
dialog.afterClosed().subscribe(async (result) => {
|
||||
if (result) {
|
||||
const requestResult = await firstValueFrom(
|
||||
this.requestService.requestMovie({
|
||||
theMovieDbId: this.theMovidDbId,
|
||||
languageCode: this.translate.currentLang,
|
||||
qualityPathOverride: result.radarrPathId,
|
||||
requestOnBehalf: result.username?.id,
|
||||
rootFolderOverride: result.radarrFolderId,
|
||||
is4KRequest: is4K,
|
||||
}),
|
||||
);
|
||||
if (requestResult.result) {
|
||||
if (is4K) {
|
||||
this.movie.has4KRequest = true;
|
||||
} else {
|
||||
this.movie.requested = true;
|
||||
}
|
||||
this.movie.requestId = requestResult.requestId;
|
||||
this.messageService.send(this.translate.instant('Requests.RequestAddedSuccessfully', { title: this.movie.title }), 'Ok');
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(requestResult);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const result = await firstValueFrom(
|
||||
this.requestService.requestMovie({
|
||||
theMovieDbId: this.theMovidDbId,
|
||||
languageCode: this.translate.currentLang,
|
||||
requestOnBehalf: userId,
|
||||
qualityPathOverride: undefined,
|
||||
rootFolderOverride: undefined,
|
||||
is4KRequest: is4K,
|
||||
}),
|
||||
);
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.has4KRequest = true;
|
||||
} else {
|
||||
this.movie.requested = true;
|
||||
}
|
||||
this.movie.requestId = result.requestId;
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
this.messageService.send(this.translate.instant('Requests.RequestAddedSuccessfully', { title: this.movie.title }), 'Ok');
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async request(is4K: boolean, userId?: string) {
|
||||
if (!this.is4KEnabled) {
|
||||
is4K = false;
|
||||
}
|
||||
if (this.isAdmin) {
|
||||
const dialog = this.dialog.open(AdminRequestDialogComponent, { width: "700px", data: { type: RequestType.movie, id: this.movie.id, is4K: is4K }, panelClass: 'modal-panel' });
|
||||
dialog.afterClosed().subscribe(async (result) => {
|
||||
if (result) {
|
||||
const requestResult = await firstValueFrom(this.requestService.requestMovie({ theMovieDbId: this.theMovidDbId,
|
||||
languageCode: this.translate.currentLang,
|
||||
qualityPathOverride: result.radarrPathId,
|
||||
requestOnBehalf: result.username?.id,
|
||||
rootFolderOverride: result.radarrFolderId,
|
||||
is4KRequest: is4K }));
|
||||
if (requestResult.result) {
|
||||
if (is4K) {
|
||||
this.movie.has4KRequest = true;
|
||||
} else {
|
||||
this.movie.requested = true;
|
||||
}
|
||||
this.movie.requestId = requestResult.requestId;
|
||||
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.movie.title }), "Ok");
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(requestResult);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const result = await firstValueFrom(this.requestService.requestMovie({ theMovieDbId: this.theMovidDbId, languageCode: this.translate.currentLang, requestOnBehalf: userId, qualityPathOverride: undefined, rootFolderOverride: undefined, is4KRequest: is4K }));
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.has4KRequest = true;
|
||||
} else {
|
||||
this.movie.requested = true;
|
||||
}
|
||||
this.movie.requestId = result.requestId;
|
||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.movie.title }), "Ok");
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
public openDialog() {
|
||||
this.dialog.open(YoutubeTrailerComponent, {
|
||||
width: '560px',
|
||||
data: this.movie.videos.results[0].key,
|
||||
});
|
||||
}
|
||||
|
||||
public openDialog() {
|
||||
this.dialog.open(YoutubeTrailerComponent, {
|
||||
width: '560px',
|
||||
data: this.movie.videos.results[0].key
|
||||
});
|
||||
}
|
||||
public async deny() {
|
||||
const dialogRef = this.dialog.open(DenyDialogComponent, {
|
||||
width: '250px',
|
||||
data: { requestId: this.movieRequest.id, requestType: RequestType.movie },
|
||||
});
|
||||
|
||||
public async deny() {
|
||||
const dialogRef = this.dialog.open(DenyDialogComponent, {
|
||||
width: '250px',
|
||||
data: { requestId: this.movieRequest.id, requestType: RequestType.movie }
|
||||
});
|
||||
dialogRef.afterClosed().subscribe((result) => {
|
||||
this.movieRequest.denied = result.denied;
|
||||
this.movieRequest.deniedReason = result.reason;
|
||||
});
|
||||
}
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
this.movieRequest.denied = result.denied;
|
||||
this.movieRequest.deniedReason = result.reason;
|
||||
});
|
||||
}
|
||||
public async issue() {
|
||||
let provider = this.movie.id.toString();
|
||||
if (this.movie.imdbId) {
|
||||
provider = this.movie.imdbId;
|
||||
}
|
||||
const dialogRef = this.dialog.open(NewIssueComponent, {
|
||||
width: '500px',
|
||||
data: {
|
||||
requestId: this.movieRequest ? this.movieRequest.id : null,
|
||||
requestType: RequestType.movie,
|
||||
providerId: provider,
|
||||
title: this.movie.title,
|
||||
posterPath: this.movie.posterPath,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
public async issue() {
|
||||
let provider = this.movie.id.toString();
|
||||
if (this.movie.imdbId) {
|
||||
provider = this.movie.imdbId;
|
||||
}
|
||||
const dialogRef = this.dialog.open(NewIssueComponent, {
|
||||
width: '500px',
|
||||
data: { requestId: this.movieRequest ? this.movieRequest.id : null, requestType: RequestType.movie, providerId: provider, title: this.movie.title, posterPath: this.movie.posterPath }
|
||||
});
|
||||
}
|
||||
public async approve(is4K: boolean) {
|
||||
const result = await firstValueFrom(this.requestService.approveMovie({ id: this.movieRequest.id, is4K }));
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.approved4K = true;
|
||||
} else {
|
||||
this.movie.approved = true;
|
||||
}
|
||||
this.messageService.send(this.translate.instant('Requests.SuccessfullyApproved'), 'Ok');
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
|
||||
public async approve(is4K: boolean) {
|
||||
const result = await firstValueFrom(this.requestService.approveMovie({ id: this.movieRequest.id, is4K }));
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.approved4K = true;
|
||||
} else {
|
||||
this.movie.approved = true;
|
||||
}
|
||||
this.messageService.send(this.translate.instant("Requests.SuccessfullyApproved"), "Ok");
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
public async markAvailable(is4K: boolean) {
|
||||
const result = await firstValueFrom(this.requestService.markMovieAvailable({ id: this.movieRequest.id, is4K }));
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.available4K = true;
|
||||
} else {
|
||||
this.movie.available = true;
|
||||
}
|
||||
this.messageService.send(this.translate.instant('Requests.NowAvailable'), 'Ok');
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
|
||||
public async markAvailable(is4K: boolean) {
|
||||
const result = await firstValueFrom(this.requestService.markMovieAvailable({ id: this.movieRequest.id, is4K }))
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.available4K = true;
|
||||
} else {
|
||||
this.movie.available = true;
|
||||
}
|
||||
this.messageService.send(this.translate.instant("Requests.NowAvailable"), "Ok");
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
public async markUnavailable(is4K: boolean) {
|
||||
const result = await firstValueFrom(this.requestService.markMovieUnavailable({ id: this.movieRequest.id, is4K }));
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.available4K = false;
|
||||
} else {
|
||||
this.movie.available = false;
|
||||
}
|
||||
this.messageService.send(this.translate.instant('Requests.NowUnavailable'), 'Ok');
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
|
||||
public setAdvancedOptions(data: IAdvancedData) {
|
||||
this.advancedOptions = data;
|
||||
if (data.rootFolderId) {
|
||||
this.movieRequest.qualityOverrideTitle = data.profiles.filter((x) => x.id == data.profileId)[0].name;
|
||||
}
|
||||
if (data.profileId) {
|
||||
this.movieRequest.rootPathOverrideTitle = data.rootFolders.filter((x) => x.id == data.rootFolderId)[0].path;
|
||||
}
|
||||
}
|
||||
|
||||
public async markUnavailable(is4K: boolean) {
|
||||
const result = await firstValueFrom(this.requestService.markMovieUnavailable({ id: this.movieRequest.id, is4K }));
|
||||
if (result.result) {
|
||||
if (is4K) {
|
||||
this.movie.available4K = false;
|
||||
} else {
|
||||
this.movie.available = false;
|
||||
}
|
||||
this.messageService.send(this.translate.instant("Requests.NowUnavailable"), "Ok");
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
}
|
||||
public async openAdvancedOptions() {
|
||||
const dialog = this.dialog.open(MovieAdvancedOptionsComponent, {
|
||||
width: '700px',
|
||||
data: <IAdvancedData>{ movieRequest: this.movieRequest },
|
||||
panelClass: 'modal-panel',
|
||||
});
|
||||
await dialog.afterClosed().subscribe(async (result) => {
|
||||
if (result) {
|
||||
result.rootFolder = result.rootFolders.filter((f) => f.id === +result.rootFolderId)[0];
|
||||
result.profile = result.profiles.filter((f) => f.id === +result.profileId)[0];
|
||||
await this.requestService2
|
||||
.updateMovieAdvancedOptions({
|
||||
qualityOverride: result.profileId,
|
||||
rootPathOverride: result.rootFolderId,
|
||||
languageProfile: 0,
|
||||
requestId: this.movieRequest.id,
|
||||
})
|
||||
.toPromise();
|
||||
this.setAdvancedOptions(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public setAdvancedOptions(data: IAdvancedData) {
|
||||
this.advancedOptions = data;
|
||||
if (data.rootFolderId) {
|
||||
this.movieRequest.qualityOverrideTitle = data.profiles.filter(x => x.id == data.profileId)[0].name;
|
||||
}
|
||||
if (data.profileId) {
|
||||
this.movieRequest.rootPathOverrideTitle = data.rootFolders.filter(x => x.id == data.rootFolderId)[0].path;
|
||||
}
|
||||
}
|
||||
public reProcessRequest(is4K: boolean) {
|
||||
this.requestService2.reprocessRequest(this.movieRequest.id, RequestType.movie, is4K).subscribe((result) => {
|
||||
if (result.result) {
|
||||
this.messageService.send(result.message ? result.message : this.translate.instant('Requests.SuccessfullyReprocessed'), 'Ok');
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public async openAdvancedOptions() {
|
||||
const dialog = this.dialog.open(MovieAdvancedOptionsComponent, { width: "700px", data: <IAdvancedData>{ movieRequest: this.movieRequest }, panelClass: 'modal-panel' })
|
||||
await dialog.afterClosed().subscribe(async result => {
|
||||
if (result) {
|
||||
result.rootFolder = result.rootFolders.filter(f => f.id === +result.rootFolderId)[0];
|
||||
result.profile = result.profiles.filter(f => f.id === +result.profileId)[0];
|
||||
await this.requestService2.updateMovieAdvancedOptions({ qualityOverride: result.profileId, rootPathOverride: result.rootFolderId, languageProfile: 0, requestId: this.movieRequest.id }).toPromise();
|
||||
this.setAdvancedOptions(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
public notify() {
|
||||
this.requestService.subscribeToMovie(this.movieRequest.id).subscribe((result) => {
|
||||
if (result) {
|
||||
this.movie.subscribed = true;
|
||||
this.messageService.send(this.translate.instant('Requests.SuccessfulNotify', { title: this.movie.title }), 'Ok');
|
||||
} else {
|
||||
this.messageService.send(this.translate.instant('Requests.CouldntNotify', { title: this.movie.title }), 'Ok');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public reProcessRequest(is4K: boolean) {
|
||||
this.requestService2.reprocessRequest(this.movieRequest.id, RequestType.movie, is4K).subscribe(result => {
|
||||
if (result.result) {
|
||||
this.messageService.send(result.message ? result.message : this.translate.instant("Requests.SuccessfullyReprocessed"), "Ok");
|
||||
} else {
|
||||
this.messageService.sendRequestEngineResultError(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
public unNotify() {
|
||||
this.requestService.unSubscribeToMovie(this.movieRequest.id).subscribe((result) => {
|
||||
if (result) {
|
||||
this.movie.subscribed = false;
|
||||
this.messageService.send(this.translate.instant('Requests.SuccessfulUnNotify', { title: this.movie.title }), 'Ok');
|
||||
} else {
|
||||
this.messageService.send(this.translate.instant('Requests.CouldntNotify', { title: this.movie.title }), 'Ok');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public notify() {
|
||||
this.requestService.subscribeToMovie(this.movieRequest.id).subscribe(result => {
|
||||
if (result) {
|
||||
this.movie.subscribed = true;
|
||||
this.messageService.send(this.translate.instant("Requests.SuccessfulNotify", {title: this.movie.title}), "Ok");
|
||||
} else {
|
||||
this.messageService.send(this.translate.instant("Requests.CouldntNotify", {title: this.movie.title}), "Ok");
|
||||
}
|
||||
});
|
||||
}
|
||||
private loadBanner() {
|
||||
this.imageService.getMovieBanner(this.theMovidDbId.toString()).subscribe((x) => {
|
||||
if (!this.movie.backdropPath) {
|
||||
this.movie.background = this.sanitizer.bypassSecurityTrustStyle('url(' + x + ')');
|
||||
} else {
|
||||
this.movie.background = this.sanitizer.bypassSecurityTrustStyle(
|
||||
'url(https://image.tmdb.org/t/p/original/' + this.movie.backdropPath + ')',
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
private checkPoster() {
|
||||
if (this.movie.posterPath == null) {
|
||||
this.movie.posterPath = '../../../images/default_movie_poster.png';
|
||||
} else {
|
||||
this.movie.posterPath = 'https://image.tmdb.org/t/p/w300/' + this.movie.posterPath;
|
||||
}
|
||||
}
|
||||
private loadAdvancedInfo() {
|
||||
const profile = this.radarrService.getQualityProfilesFromSettings();
|
||||
const folders = this.radarrService.getRootFoldersFromSettings();
|
||||
|
||||
public unNotify() {
|
||||
this.requestService.unSubscribeToMovie(this.movieRequest.id).subscribe(result => {
|
||||
if (result) {
|
||||
this.movie.subscribed = false;
|
||||
this.messageService.send(this.translate.instant("Requests.SuccessfulUnNotify", {title: this.movie.title}), "Ok");
|
||||
} else {
|
||||
this.messageService.send(this.translate.instant("Requests.CouldntNotify", {title: this.movie.title}), "Ok");
|
||||
}
|
||||
});
|
||||
}
|
||||
forkJoin([profile, folders]).subscribe((x) => {
|
||||
const radarrProfiles = x[0] ?? [];
|
||||
const radarrRootFolders = x[1] ?? [];
|
||||
|
||||
private loadBanner() {
|
||||
this.imageService.getMovieBanner(this.theMovidDbId.toString()).subscribe(x => {
|
||||
if (!this.movie.backdropPath) {
|
||||
this.movie.background = this.sanitizer.bypassSecurityTrustStyle
|
||||
("url(" + x + ")");
|
||||
} else {
|
||||
this.movie.background = this.sanitizer.bypassSecurityTrustStyle
|
||||
("url(https://image.tmdb.org/t/p/original/" + this.movie.backdropPath + ")");
|
||||
}
|
||||
});
|
||||
}
|
||||
private checkPoster() {
|
||||
if (this.movie.posterPath == null) {
|
||||
this.movie.posterPath = "../../../images/default_movie_poster.png";
|
||||
}
|
||||
else {
|
||||
this.movie.posterPath = "https://image.tmdb.org/t/p/w300/" + this.movie.posterPath
|
||||
};
|
||||
}
|
||||
private loadAdvancedInfo() {
|
||||
const profile = this.radarrService.getQualityProfilesFromSettings();
|
||||
const folders = this.radarrService.getRootFoldersFromSettings();
|
||||
const profile = radarrProfiles.filter((p) => {
|
||||
return p.id === this.movieRequest.qualityOverride;
|
||||
});
|
||||
if (profile.length > 0) {
|
||||
this.movieRequest.qualityOverrideTitle = profile[0].name;
|
||||
}
|
||||
|
||||
forkJoin([profile, folders]).subscribe(x => {
|
||||
const radarrProfiles = x[0];
|
||||
const radarrRootFolders = x[1];
|
||||
const path = radarrRootFolders.filter((folder) => {
|
||||
return folder.id === this.movieRequest.rootPathOverride;
|
||||
});
|
||||
if (path.length > 0) {
|
||||
this.movieRequest.rootPathOverrideTitle = path[0].path;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const profile = radarrProfiles.filter((p) => {
|
||||
return p.id === this.movieRequest.qualityOverride;
|
||||
});
|
||||
if (profile.length > 0) {
|
||||
this.movieRequest.qualityOverrideTitle = profile[0].name;
|
||||
}
|
||||
|
||||
const path = radarrRootFolders.filter((folder) => {
|
||||
return folder.id === this.movieRequest.rootPathOverride;
|
||||
});
|
||||
if (path.length > 0) {
|
||||
this.movieRequest.rootPathOverrideTitle = path[0].path;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private orderCrew(crew: ICrewViewModel[]): ICrewViewModel[] {
|
||||
return crew.sort((a, b) => {
|
||||
if (a.job === "Director") {
|
||||
return -1;
|
||||
} else if (b.job === "Director") {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
private orderCrew(crew: ICrewViewModel[]): ICrewViewModel[] {
|
||||
return crew.sort((a, b) => {
|
||||
if (a.job === 'Director') {
|
||||
return -1;
|
||||
} else if (b.job === 'Director') {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,137 +1,138 @@
|
||||
<div *ngIf="movie" class="left-panel-details">
|
||||
<div class="rating medium-font">
|
||||
<span *ngIf="movie.voteAverage"
|
||||
matTooltip="{{'MediaDetails.Votes' | translate }} {{movie.voteCount | thousandShort: 1}}">
|
||||
<img class="rating-small" src="{{baseUrl}}/images/tmdb-logo.svg"> {{movie.voteAverage | number:'1.0-1'}}/10
|
||||
</span>
|
||||
<span *ngIf="ratings?.critics_rating && ratings?.critics_score">
|
||||
<img class="rating-small"
|
||||
src="{{baseUrl}}/images/{{ratings.critics_rating === 'Rotten' ? 'rotten-rotten.svg' : 'rotten-fresh.svg'}}">
|
||||
{{ratings.critics_score}}%
|
||||
</span>
|
||||
<span *ngIf="ratings?.audience_rating && ratings?.audience_score">
|
||||
<img class="rating-small"
|
||||
src="{{baseUrl}}/images/{{ratings.audience_rating === 'Upright' ? 'rotten-audience-fresh.svg' : 'rotten-audience-rotten.svg'}}">
|
||||
{{ratings.audience_score}}%
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="streams?.length > 0" class="streaming-on">
|
||||
<hr>
|
||||
<span class="label">{{'MediaDetails.StreamingOn' | translate }}</span>
|
||||
<div>
|
||||
<span *ngFor="let stream of streams">
|
||||
<img class="stream-small" [matTooltip]="stream.streamingProvider" src="https://image.tmdb.org/t/p/original{{stream.logo}}">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<span class="label">{{'MediaDetails.Status' | translate }}</span>
|
||||
<span id="status"> {{ this.movie.status | translateStatus }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="label">{{'MediaDetails.Availability' | translate }}</span>
|
||||
<span *ngIf="movie.available || movie.available4K"> {{'Common.Available' | translate}}</span>
|
||||
<span *ngIf="!movie.available && !movie.available4K"> {{'Common.NotAvailable' | translate}}</span>
|
||||
</div>
|
||||
<div *ngIf="(!movie.available && movie.requested) || (!movie.available4K && movie.has4KRequest)">
|
||||
<span class="label">{{'MediaDetails.RequestStatus' | translate }}</span>
|
||||
<div>{{getStatus(movie) | translate}}</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="request">
|
||||
<span class="label">{{'MediaDetails.RequestedBy' | translate }}</span>
|
||||
<span id="requestedByInfo"> {{request.requestedUser.userAlias}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="request">
|
||||
<span class="label">{{'MediaDetails.RequestDate' | translate }}</span>
|
||||
<span *ngIf="request.requestedDate < request.requestedDate4k"> {{request.requestedDate4k | amUserLocale | amDateFormat: 'LL'}}</span>
|
||||
<span *ngIf="request.requestedDate > request.requestedDate4k"> {{request.requestedDate | amUserLocale | amDateFormat: 'LL'}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="request && request.source !== RequestSource.Ombi">
|
||||
<span class="label">{{'MediaDetails.RequestSource' | translate }}</span>
|
||||
{{RequestSource[request.source]}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="request && ( request.deniedReason || request.deniedReason4K )">
|
||||
<span class="label">{{'MediaDetails.DeniedReason' | translate }}</span>
|
||||
<div *ngIf="request.deniedReason">
|
||||
<span id="deniedReasonInfo">{{request.deniedReason}}</span>
|
||||
</div>
|
||||
<div *ngIf="request.deniedReason4K">
|
||||
<span id="deniedReasonInfo4K">{{request.deniedReason4K}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="movie.quality">
|
||||
<span class="label">{{'MediaDetails.Quality' | translate }}</span>
|
||||
<div>{{movie.quality | quality}}</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="movie.available4K">
|
||||
<span class="label">{{'MediaDetails.Quality' | translate }} </span>
|
||||
<span>{{"4K" | quality}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="advancedOptions && request && request.rootPathOverrideTitle">
|
||||
<span class="label">{{'MediaDetails.RootFolderOverride' | translate }}</span>
|
||||
<div>{{request.rootPathOverrideTitle}}</div>
|
||||
</div>
|
||||
<div *ngIf="advancedOptions && request && request.qualityOverrideTitle">
|
||||
<span class="label">{{'MediaDetails.QualityOverride' | translate }}</span>
|
||||
<div>{{request.qualityOverrideTitle}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
<span class="label">{{'MediaDetails.TheatricalRelease' | translate }}</span>
|
||||
{{movie.releaseDate | amUserLocale | amDateFormat: 'LL': 'mediumDate'}}
|
||||
|
||||
<div *ngIf="movie.digitalReleaseDate">
|
||||
<span class="label">{{'MediaDetails.DigitalRelease' | translate }}</span>
|
||||
{{movie.digitalReleaseDate | amUserLocale | amDateFormat: 'LL': 'mediumDate'}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="movie.voteCount">
|
||||
<span class="label">{{'MediaDetails.Votes' | translate }}</span>
|
||||
{{movie.voteCount | thousandShort: 1}}
|
||||
</div>
|
||||
<div>
|
||||
<span class="label">{{'MediaDetails.Runtime' | translate }}</span>
|
||||
{{'MediaDetails.Minutes' | translate:{runtime: movie.runtime} }}
|
||||
</div>
|
||||
<div *ngIf="movie.revenue">
|
||||
<span class="label">{{'MediaDetails.Revenue' | translate }}</span>
|
||||
{{movie.revenue | currency: 'USD'}}
|
||||
</div>
|
||||
<div *ngIf="movie.budget">
|
||||
<span class="label">{{'MediaDetails.Budget' | translate }}</span>
|
||||
{{movie.budget | currency: 'USD'}}
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="genre-button-container" *ngIf="movie.genres">
|
||||
<span class="label">{{'MediaDetails.GenresLabel' | translate }}</span>
|
||||
<div>
|
||||
<mat-chip-list>
|
||||
<mat-chip selected *ngFor="let genre of movie.genres">
|
||||
{{genre.name}}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="keyword-button-container" *ngIf="movie?.keywords?.keywordsValue?.length > 0">
|
||||
<span class="label">{{'MediaDetails.Keywords' | translate }}</span>
|
||||
<mat-chip-list>
|
||||
<mat-chip selected *ngFor="let keyword of movie.keywords.keywordsValue">
|
||||
{{keyword.name}}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
<div class="rating medium-font">
|
||||
<span *ngIf="movie.voteAverage" matTooltip="{{ 'MediaDetails.Votes' | translate }} {{ movie.voteCount | thousandShort: 1 }}">
|
||||
<img class="rating-small" src="{{ baseUrl }}/images/tmdb-logo.svg" /> {{ movie.voteAverage | number: '1.0-1' }}/10
|
||||
</span>
|
||||
<span *ngIf="ratings?.critics_rating && ratings?.critics_score">
|
||||
<img
|
||||
class="rating-small"
|
||||
src="{{ baseUrl }}/images/{{ ratings.critics_rating === 'Rotten' ? 'rotten-rotten.svg' : 'rotten-fresh.svg' }}"
|
||||
/>
|
||||
{{ ratings.critics_score }}%
|
||||
</span>
|
||||
<span *ngIf="ratings?.audience_rating && ratings?.audience_score">
|
||||
<img
|
||||
class="rating-small"
|
||||
src="{{ baseUrl }}/images/{{ ratings.audience_rating === 'Upright' ? 'rotten-audience-fresh.svg' : 'rotten-audience-rotten.svg' }}"
|
||||
/>
|
||||
{{ ratings.audience_score }}%
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="streams?.length > 0" class="streaming-on">
|
||||
<hr />
|
||||
<span class="label">{{ 'MediaDetails.StreamingOn' | translate }}</span>
|
||||
<div>
|
||||
<span *ngFor="let stream of streams">
|
||||
<img class="stream-small" [matTooltip]="stream.streamingProvider" src="https://image.tmdb.org/t/p/original{{ stream.logo }}" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<span class="label">{{ 'MediaDetails.Status' | translate }}</span>
|
||||
<span id="status"> {{ this.movie.status | translateStatus }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="label">{{ 'MediaDetails.Availability' | translate }}</span>
|
||||
<span *ngIf="movie.available || movie.available4K"> {{ 'Common.Available' | translate }}</span>
|
||||
<span *ngIf="!movie.available && !movie.available4K"> {{ 'Common.NotAvailable' | translate }}</span>
|
||||
</div>
|
||||
<div *ngIf="(!movie.available && movie.requested) || (!movie.available4K && movie.has4KRequest)">
|
||||
<span class="label">{{ 'MediaDetails.RequestStatus' | translate }}</span>
|
||||
<div>{{ getStatus(movie) | translate }}</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="request">
|
||||
<span class="label">{{ 'MediaDetails.RequestedBy' | translate }}</span>
|
||||
<span id="requestedByInfo"> {{ request.requestedUser.userAlias }}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="request">
|
||||
<span class="label">{{ 'MediaDetails.RequestDate' | translate }}</span>
|
||||
<span *ngIf="request.requestedDate < request.requestedDate4k"> {{ request.requestedDate4k | dfnsFormat: 'PP' }}</span>
|
||||
<span *ngIf="request.requestedDate > request.requestedDate4k"> {{ request.requestedDate | dfnsFormat: 'PP' }}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="request && request.source !== RequestSource.Ombi">
|
||||
<span class="label">{{ 'MediaDetails.RequestSource' | translate }}</span>
|
||||
{{ RequestSource[request.source] }}
|
||||
</div>
|
||||
|
||||
<div *ngIf="request && (request.deniedReason || request.deniedReason4K)">
|
||||
<span class="label">{{ 'MediaDetails.DeniedReason' | translate }}</span>
|
||||
<div *ngIf="request.deniedReason">
|
||||
<span id="deniedReasonInfo">{{ request.deniedReason }}</span>
|
||||
</div>
|
||||
<div *ngIf="request.deniedReason4K">
|
||||
<span id="deniedReasonInfo4K">{{ request.deniedReason4K }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="movie.quality">
|
||||
<span class="label">{{ 'MediaDetails.Quality' | translate }}</span>
|
||||
<div>{{ movie.quality | quality }}</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="movie.available4K">
|
||||
<span class="label">{{ 'MediaDetails.Quality' | translate }} </span>
|
||||
<span>{{ '4K' | quality }}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="advancedOptions && request && request.rootPathOverrideTitle">
|
||||
<span class="label">{{ 'MediaDetails.RootFolderOverride' | translate }}</span>
|
||||
<div>{{ request.rootPathOverrideTitle }}</div>
|
||||
</div>
|
||||
<div *ngIf="advancedOptions && request && request.qualityOverrideTitle">
|
||||
<span class="label">{{ 'MediaDetails.QualityOverride' | translate }}</span>
|
||||
<div>{{ request.qualityOverrideTitle }}</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<span class="label">{{ 'MediaDetails.TheatricalRelease' | translate }}</span>
|
||||
{{ movie.releaseDate | dfnsFormat: 'PP' }}
|
||||
|
||||
<div *ngIf="movie.digitalReleaseDate">
|
||||
<span class="label">{{ 'MediaDetails.DigitalRelease' | translate }}</span>
|
||||
{{ movie.digitalReleaseDate | dfnsFormat: 'PP' }}
|
||||
</div>
|
||||
|
||||
<div *ngIf="movie.voteCount">
|
||||
<span class="label">{{ 'MediaDetails.Votes' | translate }}</span>
|
||||
{{ movie.voteCount | thousandShort: 1 }}
|
||||
</div>
|
||||
<div>
|
||||
<span class="label">{{ 'MediaDetails.Runtime' | translate }}</span>
|
||||
{{ 'MediaDetails.Minutes' | translate: { runtime: movie.runtime } }}
|
||||
</div>
|
||||
<div *ngIf="movie.revenue">
|
||||
<span class="label">{{ 'MediaDetails.Revenue' | translate }}</span>
|
||||
{{ movie.revenue | currency: 'USD' }}
|
||||
</div>
|
||||
<div *ngIf="movie.budget">
|
||||
<span class="label">{{ 'MediaDetails.Budget' | translate }}</span>
|
||||
{{ movie.budget | currency: 'USD' }}
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="genre-button-container" *ngIf="movie.genres">
|
||||
<span class="label">{{ 'MediaDetails.GenresLabel' | translate }}</span>
|
||||
<div>
|
||||
<mat-chip-list>
|
||||
<mat-chip selected *ngFor="let genre of movie.genres">
|
||||
{{ genre.name }}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="keyword-button-container" *ngIf="movie?.keywords?.keywordsValue?.length > 0">
|
||||
<span class="label">{{ 'MediaDetails.Keywords' | translate }}</span>
|
||||
<mat-chip-list>
|
||||
<mat-chip selected *ngFor="let keyword of movie.keywords.keywordsValue">
|
||||
{{ keyword.name }}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,21 +1,19 @@
|
||||
<section id="summary-wrapper">
|
||||
<div class="full-screenshot enabled" [style.background-image]="background"></div>
|
||||
<div class="full-screenshot enabled overlay"></div>
|
||||
|
||||
<section id="summary-wrapper">
|
||||
<div class="full-screenshot enabled" [style.background-image]="background"></div>
|
||||
<div class="full-screenshot enabled overlay"></div>
|
||||
<div class="container summary">
|
||||
<div class="container title-top-banner">
|
||||
<div class="row">
|
||||
<div class="mobile-top-text">
|
||||
<h1 id="mediaTitle" class="large-text">
|
||||
{{ title }}
|
||||
<span *ngIf="releaseDateFormat" class="grey-text"> ({{ releaseDate | dfnsFormat: 'P' }})</span>
|
||||
</h1>
|
||||
|
||||
<div class="container summary">
|
||||
<div class="container title-top-banner">
|
||||
<div class="row">
|
||||
<div
|
||||
class="mobile-top-text">
|
||||
<h1 id="mediaTitle" class="large-text">{{title}}
|
||||
<span *ngIf="releaseDateFormat" class="grey-text">
|
||||
({{releaseDate | amLocal | amDateFormat: 'YYYY'}})</span>
|
||||
</h1>
|
||||
|
||||
<h2 class="tagline">{{tagline}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<h2 class="tagline">{{ tagline }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -1,66 +1,69 @@
|
||||
<mat-accordion class="mat-elevation-z8">
|
||||
<mat-expansion-panel *ngFor="let request of tvRequest">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<div> {{ request.requestStatus | translate }}</div>
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{'MediaDetails.RequestedByOn' | translate: {
|
||||
user: request.requestedUser.userAlias,
|
||||
date: request.requestedDate | amLocal | amUserLocale | amDateFormat: 'LL' } }}
|
||||
<span *ngIf="request.denied"> - {{request.deniedReason}}</span>
|
||||
<span *ngIf="request.source !== RequestSource.Ombi"> {{'MediaDetails.RequestSource' | translate }} {{RequestSource[request.source]}}</span>
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-expansion-panel *ngFor="let request of tvRequest">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<div>{{ request.requestStatus | translate }}</div>
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{
|
||||
'MediaDetails.RequestedByOn'
|
||||
| translate
|
||||
: {
|
||||
user: request.requestedUser.userAlias,
|
||||
date: request.requestedDate | dfnsFormat: 'PP'
|
||||
}
|
||||
}}
|
||||
<span *ngIf="request.denied"> - {{ request.deniedReason }}</span>
|
||||
<span *ngIf="request.source !== RequestSource.Ombi"
|
||||
> {{ 'MediaDetails.RequestSource' | translate }} {{ RequestSource[request.source] }}</span
|
||||
>
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab *ngFor="let season of request.seasonRequests" label="{{ 'Requests.Season' | translate }} {{ season.seasonNumber }}">
|
||||
<table mat-table [dataSource]="season.episodes" class="mat-elevation-z8">
|
||||
<ng-container matColumnDef="number">
|
||||
<th mat-header-cell *matHeaderCellDef>#</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.episodeNumber }}</td>
|
||||
</ng-container>
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab *ngFor="let season of request.seasonRequests" label="{{ 'Requests.Season' | translate }} {{season.seasonNumber}}">
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.GridTitle' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.title }}</td>
|
||||
</ng-container>
|
||||
|
||||
<table mat-table [dataSource]="season.episodes" class="mat-elevation-z8">
|
||||
<ng-container matColumnDef="airDate">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.AirDate' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.airDate | dfnsFormat: 'P' }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.GridStatus' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let ep">
|
||||
<span> {{ request.requestStatus | translate }} </span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="number">
|
||||
<th mat-header-cell *matHeaderCellDef> # </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.episodeNumber}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'Requests.GridTitle' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.title}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="airDate">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'Requests.AirDate' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.airDate | amLocal | amUserLocale | amDateFormat: 'L' }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'Requests.GridStatus' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let ep">
|
||||
<span> {{ request.requestStatus | translate }} </span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
<div *ngIf="isAdmin">
|
||||
<button *ngIf="!request.approved" mat-raised-button color="accent" (click)="approve(request);"> {{ 'Common.Approve' | translate }}</button>
|
||||
<button *ngIf="!request.available" mat-raised-button color="warn" (click)="changeAvailability(request, true);">{{ 'Requests.MarkAvailable' | translate }}</button>
|
||||
<button *ngIf="request.available" mat-raised-button color="warn" (click)="changeAvailability(request, false);">{{ 'Requests.MarkUnavailable' | translate }}</button>
|
||||
<button *ngIf="!request.denied" mat-raised-button color="danger" (click)="deny(request);">{{ 'Requests.Deny' | translate }}</button>
|
||||
<button mat-raised-button color="accent" (click)="reProcessRequest(request);">{{ 'MediaDetails.ReProcessRequest' | translate }}</button>
|
||||
</div>
|
||||
<div *ngIf="isAdmin || manageOwnRequests">
|
||||
<button mat-raised-button color="danger" (click)="delete(request);">{{ 'Requests.RequestPanel.Delete' | translate }}</button>
|
||||
</div>
|
||||
|
||||
|
||||
</mat-expansion-panel>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
<div *ngIf="isAdmin">
|
||||
<button *ngIf="!request.approved" mat-raised-button color="accent" (click)="approve(request)">{{ 'Common.Approve' | translate }}</button>
|
||||
<button *ngIf="!request.available" mat-raised-button color="warn" (click)="changeAvailability(request, true)">
|
||||
{{ 'Requests.MarkAvailable' | translate }}
|
||||
</button>
|
||||
<button *ngIf="request.available" mat-raised-button color="warn" (click)="changeAvailability(request, false)">
|
||||
{{ 'Requests.MarkUnavailable' | translate }}
|
||||
</button>
|
||||
<button *ngIf="!request.denied" mat-raised-button color="danger" (click)="deny(request)">{{ 'Requests.Deny' | translate }}</button>
|
||||
<button mat-raised-button color="accent" (click)="reProcessRequest(request)">{{ 'MediaDetails.ReProcessRequest' | translate }}</button>
|
||||
</div>
|
||||
<div *ngIf="isAdmin || manageOwnRequests">
|
||||
<button mat-raised-button color="danger" (click)="delete(request)">{{ 'Requests.RequestPanel.Delete' | translate }}</button>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
|
@ -1,171 +1,228 @@
|
||||
<div *ngIf="!tv" class="justify-content-md-center top-spacing loading-spinner">
|
||||
<mat-spinner [color]="'accent'"></mat-spinner>
|
||||
<mat-spinner [color]="'accent'"></mat-spinner>
|
||||
</div>
|
||||
<div *ngIf="tv" class="main-content-container">
|
||||
<div *ngIf="tv.id === 0; else main">
|
||||
<div class="small-middle-container no-info">
|
||||
<h1><i class="far fa-frown-o" aria-hidden="true"></i></h1>
|
||||
<h3> {{ 'MediaDetails.NotEnoughInfo' | translate }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<ng-template #main>
|
||||
|
||||
<div>
|
||||
|
||||
<top-banner [background]="tv.background" [available]="tv.available" [title]="tv.title"
|
||||
[releaseDate]="tv.firstAired" [tagline]="tv.tagline"></top-banner>
|
||||
<div class="social-icons-container">
|
||||
<social-icons
|
||||
[homepage]="tv.homepage"
|
||||
[theMoviedbId]="tv.id"
|
||||
[hasTrailer]="tv.trailer"
|
||||
[twitter]="tv.externalIds?.twitterId"
|
||||
[facebook]="tv.externalIds?.facebookId"
|
||||
[instagram]="tv.externalIds?.instagramId"
|
||||
(openTrailer)="openDialog()"
|
||||
[imdbId]="tv.imdbId"
|
||||
[isAdmin]="isAdmin"
|
||||
[canShowAdvanced]="showAdvanced && showRequest"
|
||||
[type]="requestType"
|
||||
(onAdvancedOptions)="openAdvancedOptions()"
|
||||
>
|
||||
</social-icons>
|
||||
</div>
|
||||
|
||||
<section id="info-wrapper">
|
||||
<div class="small-middle-container">
|
||||
<div class="row justify-content-center justify-content-sm-start header-container">
|
||||
<div class="details-poster-container">
|
||||
<media-poster [posterPath]=tv.images.original></media-poster>
|
||||
</div>
|
||||
<!--Next to poster-->
|
||||
<div class="details-button-container">
|
||||
<div class="col-12 media-row">
|
||||
<ng-container *ngIf="tv.fullyAvailable || tv.partlyAvailable">
|
||||
<a id="viewOnPlexButton" *ngIf="tv.plexUrl" href="{{tv.plexUrl}}" mat-raised-button target="_blank" class="btn-spacing viewon-btn plex">
|
||||
{{'Search.ViewOnPlex' | translate}}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a id="viewOnEmbyButton" *ngIf="tv.embyUrl" href="{{tv.embyUrl}}" mat-raised-button target="_blank" class="btn-spacing viewon-btn emby">
|
||||
{{'Search.ViewOnEmby' | translate}}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a id="viewOnJellyfinButton" *ngIf="tv.jellyfinUrl" href="{{tv.jellyfinUrl}}" mat-raised-button target="_blank" class="btn-spacing viewon-btn jellyfin">
|
||||
{{'Search.ViewOnJellyfin' | translate}}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
</ng-container>
|
||||
<button *ngIf="(!tv.fullyAvailable || (tv.fullyAvailable && tv.partlyAvailable)) && !allEpisodesRequestedOrAvailable()" mat-raised-button id="requestBtn" class="btn-spacing" color="primary"
|
||||
(click)="request()"><i class="fas fa-plus"></i>
|
||||
{{ 'Common.Request' | translate }}</button>
|
||||
|
||||
<button *ngIf="!tv.denied && allEpisodesRequestedOrAvailable()" mat-raised-button class="btn-spacing" color="warn" [disabled]>
|
||||
<i class="fas fa-check"></i>
|
||||
{{ 'Common.Requested' | translate }}</button>
|
||||
|
||||
<button *ngIf="tv.fullyAvailable && !tv.partlyAvailable" id="availableBtn" mat-raised-button class="btn-spacing" color="accent"
|
||||
[disabled]>
|
||||
<i class="fas fa-check"></i> {{'Common.Available' | translate }}</button>
|
||||
|
||||
<button *ngIf="tv.partlyAvailable && !tv.fullyAvailable" id="partiallyAvailableBtn" mat-raised-button
|
||||
class="btn-spacing" color="accent" [disabled]>
|
||||
<i class="fas fa-check"></i> {{'Common.PartiallyAvailable' | translate }}</button>
|
||||
|
||||
<!-- There are unaired episodes-->
|
||||
<button *ngIf="tv.partlyAvailable && tv.fullyAvailable" id="partiallyAvailableBtn" mat-raised-button
|
||||
class="btn-spacing" color="accent" [disabled]>
|
||||
<i class="fas fa-check"></i> {{'Common.PartiallyAvailable' | translate }}</button>
|
||||
<!-- end unaired episodes-->
|
||||
|
||||
<button id="deniedButton" *ngIf="tv.denied" [matTooltip]="tv.deniedReason" mat-raised-button class="btn-spacing" color="warn">
|
||||
<i class="fas fa-times"></i> {{'Common.Denied' | translate }}
|
||||
</button>
|
||||
|
||||
<button mat-raised-button class="btn-spacing" color="danger" id="reportIssueBtn" *ngIf="issuesEnabled" (click)="issue()">
|
||||
<i class="fas fa-exclamation"></i> {{
|
||||
'Requests.ReportIssue' | translate }}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2">
|
||||
<mat-card class="mat-elevation-z8 spacing-below">
|
||||
<mat-card-content>
|
||||
<tv-information-panel [tv]="tv" [request]="showRequest"
|
||||
[advancedOptions]="showAdvanced"></tv-information-panel>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="col-12 col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<mat-card class="mat-elevation-z8 spacing-below">
|
||||
<mat-card-content>
|
||||
{{tv.overview}}
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<cast-carousel [cast]="tv.cast"></cast-carousel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2">
|
||||
|
||||
<!--Just some space yo-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-10">
|
||||
<tv-request-grid id="requests-grid" [tvRequest]="tvRequest" [isAdmin]="isAdmin" [tv]="tv"></tv-request-grid>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-2">
|
||||
|
||||
<!--Just some space yo-->
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-md-10">
|
||||
<div class="issuesPanel">
|
||||
<issues-panel [providerId]="tv.id" [isAdmin]="isAdmin"></issues-panel>
|
||||
</div>
|
||||
<mat-accordion id="requests-panel">
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{'Requests.Title' | translate}}
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<tv-requests-panel [tvRequest]="tvRequest" [isAdmin]="isAdmin" [manageOwnRequests]="manageOwnRequests"></tv-requests-panel>
|
||||
</mat-expansion-panel>
|
||||
|
||||
</mat-accordion>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="bottom-page-gap">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</ng-template>
|
||||
<div *ngIf="tv.id === 0; else main">
|
||||
<div class="small-middle-container no-info">
|
||||
<h1><i class="far fa-frown-o" aria-hidden="true"></i></h1>
|
||||
<h3>{{ 'MediaDetails.NotEnoughInfo' | translate }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #main>
|
||||
<div>
|
||||
<top-banner
|
||||
[background]="tv.background"
|
||||
[available]="tv.available"
|
||||
[title]="tv.title"
|
||||
[releaseDate]="tv.firstAired"
|
||||
[tagline]="tv.tagline"
|
||||
></top-banner>
|
||||
<div class="social-icons-container">
|
||||
<social-icons
|
||||
[homepage]="tv.homepage"
|
||||
[theMoviedbId]="tv.id"
|
||||
[hasTrailer]="tv.trailer"
|
||||
[twitter]="tv.externalIds?.twitterId"
|
||||
[facebook]="tv.externalIds?.facebookId"
|
||||
[instagram]="tv.externalIds?.instagramId"
|
||||
(openTrailer)="openDialog()"
|
||||
[imdbId]="tv.imdbId"
|
||||
[isAdmin]="isAdmin"
|
||||
[canShowAdvanced]="showAdvanced && showRequest"
|
||||
[type]="requestType"
|
||||
(onAdvancedOptions)="openAdvancedOptions()"
|
||||
>
|
||||
</social-icons>
|
||||
</div>
|
||||
|
||||
<section id="info-wrapper">
|
||||
<div class="small-middle-container">
|
||||
<div class="row justify-content-center justify-content-sm-start header-container">
|
||||
<div class="details-poster-container">
|
||||
<media-poster [posterPath]="tv.images.original"></media-poster>
|
||||
</div>
|
||||
<!--Next to poster-->
|
||||
<div class="details-button-container">
|
||||
<div class="col-12 media-row">
|
||||
<ng-container *ngIf="tv.fullyAvailable || tv.partlyAvailable">
|
||||
<a
|
||||
id="viewOnPlexButton"
|
||||
*ngIf="tv.plexUrl"
|
||||
href="{{ tv.plexUrl }}"
|
||||
mat-raised-button
|
||||
target="_blank"
|
||||
class="btn-spacing viewon-btn plex"
|
||||
>
|
||||
{{ 'Search.ViewOnPlex' | translate }}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a
|
||||
id="viewOnEmbyButton"
|
||||
*ngIf="tv.embyUrl"
|
||||
href="{{ tv.embyUrl }}"
|
||||
mat-raised-button
|
||||
target="_blank"
|
||||
class="btn-spacing viewon-btn emby"
|
||||
>
|
||||
{{ 'Search.ViewOnEmby' | translate }}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
<a
|
||||
id="viewOnJellyfinButton"
|
||||
*ngIf="tv.jellyfinUrl"
|
||||
href="{{ tv.jellyfinUrl }}"
|
||||
mat-raised-button
|
||||
target="_blank"
|
||||
class="btn-spacing viewon-btn jellyfin"
|
||||
>
|
||||
{{ 'Search.ViewOnJellyfin' | translate }}
|
||||
<i class="far fa-play-circle fa-2x"></i>
|
||||
</a>
|
||||
</ng-container>
|
||||
<button
|
||||
*ngIf="(!tv.fullyAvailable || (tv.fullyAvailable && tv.partlyAvailable)) && !allEpisodesRequestedOrAvailable()"
|
||||
mat-raised-button
|
||||
id="requestBtn"
|
||||
class="btn-spacing"
|
||||
color="primary"
|
||||
(click)="request()"
|
||||
>
|
||||
<i class="fas fa-plus"></i> {{ 'Common.Request' | translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
*ngIf="!tv.denied && allEpisodesRequestedOrAvailable()"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="warn"
|
||||
[disabled]
|
||||
>
|
||||
<i class="fas fa-check"></i>
|
||||
{{ 'Common.Requested' | translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
*ngIf="tv.fullyAvailable && !tv.partlyAvailable"
|
||||
id="availableBtn"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
[disabled]
|
||||
>
|
||||
<i class="fas fa-check"></i> {{ 'Common.Available' | translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
*ngIf="tv.partlyAvailable && !tv.fullyAvailable"
|
||||
id="partiallyAvailableBtn"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
[disabled]
|
||||
>
|
||||
<i class="fas fa-check"></i> {{ 'Common.PartiallyAvailable' | translate }}
|
||||
</button>
|
||||
|
||||
<!-- There are unaired episodes-->
|
||||
<button
|
||||
*ngIf="tv.partlyAvailable && tv.fullyAvailable"
|
||||
id="partiallyAvailableBtn"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="accent"
|
||||
[disabled]
|
||||
>
|
||||
<i class="fas fa-check"></i> {{ 'Common.PartiallyAvailable' | translate }}
|
||||
</button>
|
||||
<!-- end unaired episodes-->
|
||||
|
||||
<button
|
||||
id="deniedButton"
|
||||
*ngIf="tv.denied"
|
||||
[matTooltip]="tv.deniedReason"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="warn"
|
||||
>
|
||||
<i class="fas fa-times"></i> {{ 'Common.Denied' | translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
color="danger"
|
||||
id="reportIssueBtn"
|
||||
*ngIf="issuesEnabled"
|
||||
(click)="issue()"
|
||||
>
|
||||
<i class="fas fa-exclamation"></i> {{ 'Requests.ReportIssue' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2">
|
||||
<mat-card class="mat-elevation-z8 spacing-below">
|
||||
<mat-card-content>
|
||||
<tv-information-panel [tv]="tv" [request]="showRequest" [advancedOptions]="showAdvanced"></tv-information-panel>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="col-12 col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<mat-card class="mat-elevation-z8 spacing-below">
|
||||
<mat-card-content>
|
||||
{{ tv.overview }}
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<cast-carousel [cast]="tv.cast"></cast-carousel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2">
|
||||
<!--Just some space yo-->
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-10">
|
||||
<tv-request-grid id="requests-grid" [tvRequest]="tvRequest" [isAdmin]="isAdmin" [tv]="tv"></tv-request-grid>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-2">
|
||||
<!--Just some space yo-->
|
||||
</div>
|
||||
<div class="col-12 col-md-10">
|
||||
<div class="issuesPanel">
|
||||
<issues-panel [providerId]="tv.id" [isAdmin]="isAdmin"></issues-panel>
|
||||
</div>
|
||||
<mat-accordion id="requests-panel">
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ 'Requests.Title' | translate }}
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<tv-requests-panel
|
||||
[tvRequest]="tvRequest"
|
||||
[isAdmin]="isAdmin"
|
||||
[manageOwnRequests]="manageOwnRequests"
|
||||
></tv-requests-panel>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-page-gap"></div>
|
||||
</section>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
@ -0,0 +1,11 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { orderBy as _orderBy } from 'lodash';
|
||||
|
||||
@Pipe({
|
||||
name: 'orderBy',
|
||||
})
|
||||
export class OrderPipe<T> implements PipeTransform {
|
||||
transform(data: T[], orderBy: string, direction: 'asc' | 'desc' = 'asc'): T[] {
|
||||
return _orderBy(data, orderBy, direction);
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
import { Pipe, PipeTransform } from "@angular/core";
|
||||
import * as moment from "moment";
|
||||
|
||||
const momentConstructor = moment;
|
||||
|
||||
@Pipe({ name: "amUserLocale" })
|
||||
export class UserLocalePipe implements PipeTransform {
|
||||
transform(value: moment.MomentInput): moment.Moment {
|
||||
const locale = navigator.language;
|
||||
return momentConstructor(value).locale(locale);
|
||||
}
|
||||
}
|
@ -1,72 +1,128 @@
|
||||
<div class="mat-elevation-z8">
|
||||
<grid-spinner [loading]="isLoadingResults"></grid-spinner>
|
||||
<grid-spinner [loading]="isLoadingResults"></grid-spinner>
|
||||
|
||||
<!-- <div class="row"> -->
|
||||
<div class="row justify-content-md-center top-spacing">
|
||||
<div class="btn-group" role="group">
|
||||
<button
|
||||
type="button"
|
||||
(click)="switchFilter(RequestFilter.All)"
|
||||
[attr.color]="currentFilter === RequestFilter.All ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.All ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.AllRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
(click)="switchFilter(RequestFilter.Pending)"
|
||||
[attr.color]="currentFilter === RequestFilter.Pending ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Pending ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.PendingRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
(click)="switchFilter(RequestFilter.Processing)"
|
||||
[attr.color]="currentFilter === RequestFilter.Processing ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Processing ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.ProcessingRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
(click)="switchFilter(RequestFilter.Available)"
|
||||
[attr.color]="currentFilter === RequestFilter.Available ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Available ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.AvailableRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
(click)="switchFilter(RequestFilter.Denied)"
|
||||
[attr.color]="currentFilter === RequestFilter.Denied ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Denied ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.DeniedRequests' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="row"> -->
|
||||
<div class="row justify-content-md-center top-spacing">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" (click)="switchFilter(RequestFilter.All)" [attr.color]="currentFilter === RequestFilter.All ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.All ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.AllRequests' | translate}}</button>
|
||||
<button type="button" (click)="switchFilter(RequestFilter.Pending)" [attr.color]="currentFilter === RequestFilter.Pending ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Pending ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.PendingRequests' | translate}}</button>
|
||||
<button type="button" (click)="switchFilter(RequestFilter.Processing)" [attr.color]="currentFilter === RequestFilter.Processing ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Processing ? 'mat-accent' : 'mat-primary'" mat-raised-button
|
||||
class="grow">{{'Requests.ProcessingRequests' | translate}}</button>
|
||||
<button type="button" (click)="switchFilter(RequestFilter.Available)" [attr.color]="currentFilter === RequestFilter.Available ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Available ? 'mat-accent' : 'mat-primary'" mat-raised-button
|
||||
class="grow">{{'Requests.AvailableRequests' | translate}}</button>
|
||||
<button type="button" (click)="switchFilter(RequestFilter.Denied)" [attr.color]="currentFilter === RequestFilter.Denied ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Denied ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.DeniedRequests' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2 offset-md-10">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="{{ 'Requests.RequestsToDisplay' | translate }}" [(value)]="gridCount" (selectionChange)="ngAfterViewInit()">
|
||||
<mat-option value="10">10</mat-option>
|
||||
<mat-option value="15">15</mat-option>
|
||||
<mat-option value="30">30</mat-option>
|
||||
<mat-option value="100">100</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<table
|
||||
mat-table
|
||||
[dataSource]="dataSource"
|
||||
class="requests table"
|
||||
matSort
|
||||
[matSortActive]="defaultSort"
|
||||
matSortDisableClear
|
||||
[matSortDirection]="defaultOrder"
|
||||
>
|
||||
<ng-container matColumnDef="artistName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.ArtistName' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.artistName }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.AlbumName' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.title }} ({{ element.releaseDate | dfnsFormat: 'P' }})</td>
|
||||
</ng-container>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2 offset-md-10">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="{{'Requests.RequestsToDisplay' | translate}}" [(value)]="gridCount" (selectionChange)="ngAfterViewInit()">
|
||||
<mat-option value="10">10</mat-option>
|
||||
<mat-option value="15">15</mat-option>
|
||||
<mat-option value="30">30</mat-option>
|
||||
<mat-option value="100">100</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<table mat-table [dataSource]="dataSource" class="requests table" matSort [matSortActive]="defaultSort" matSortDisableClear [matSortDirection]="defaultOrder">
|
||||
<ng-container matColumnDef="requestedUser.requestedBy">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.RequestedBy' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.requestedUser?.userAlias }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.RequestDate' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.requestedDate | dfnsFormat: 'PP' }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestStatus">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.RequestStatus' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.requestStatus | translate }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="artistName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.ArtistName' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.artistName}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.AlbumName' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.title}} ({{element.releaseDate | amLocal | amDateFormat: 'YYYY'}}) </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a mat-raised-button color="accent" [routerLink]="'/details/artist/' + element.foreignArtistId">{{
|
||||
'Requests.Details' | translate
|
||||
}}</a>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="warn"
|
||||
(click)="openOptions(element)"
|
||||
*ngIf="isAdmin || (manageOwnRequests && element.requestedUser?.userName == userName)"
|
||||
>
|
||||
{{ 'Requests.Options' | translate }}
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedUser.requestedBy">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'Requests.RequestedBy' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.requestedUser?.userAlias}} </td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
|
||||
<ng-container matColumnDef="requestedDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.RequestDate' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.requestedDate | amLocal | amUserLocale | amDateFormat: 'LL'}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestStatus">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.RequestStatus' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.requestStatus | translate}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef> </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a mat-raised-button color="accent" [routerLink]="'/details/artist/' + element.foreignArtistId">{{ 'Requests.Details' | translate}}</a>
|
||||
<button mat-raised-button color="warn" (click)="openOptions(element)" *ngIf="isAdmin || ( manageOwnRequests && element.requestedUser?.userName == userName )"> {{ 'Requests.Options' | translate}}</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="resultsLength" [pageSize]="gridCount"></mat-paginator>
|
||||
<mat-paginator [length]="resultsLength" [pageSize]="gridCount"></mat-paginator>
|
||||
</div>
|
||||
|
@ -1,123 +1,198 @@
|
||||
<div class="mat-elevation-z8">
|
||||
<grid-spinner [loading]="isLoadingResults"></grid-spinner>
|
||||
|
||||
|
||||
<!-- <div class="row"> -->
|
||||
<div class="row justify-content-md-center top-spacing">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" id="filterAll" (click)="switchFilter(RequestFilter.All)" [attr.color]="currentFilter === RequestFilter.All ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.All ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.AllRequests' | translate}}</button>
|
||||
<button type="button" id="filterPending" (click)="switchFilter(RequestFilter.Pending)" [attr.color]="currentFilter === RequestFilter.Pending ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Pending ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.PendingRequests' | translate}}</button>
|
||||
<button type="button" id="filterProcessing" (click)="switchFilter(RequestFilter.Processing)" [attr.color]="currentFilter === RequestFilter.Processing ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Processing ? 'mat-accent' : 'mat-primary'" mat-raised-button
|
||||
class="grow">{{'Requests.ProcessingRequests' | translate}}</button>
|
||||
<button type="button" id="filterAvailable" (click)="switchFilter(RequestFilter.Available)" [attr.color]="currentFilter === RequestFilter.Available ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Available ? 'mat-accent' : 'mat-primary'" mat-raised-button
|
||||
class="grow">{{'Requests.AvailableRequests' | translate}}</button>
|
||||
<button type="button" id="filterDenied" (click)="switchFilter(RequestFilter.Denied)" [attr.color]="currentFilter === RequestFilter.Denied ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Denied ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.DeniedRequests' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2 offset-md-10">
|
||||
<mat-form-field>
|
||||
<mat-select id="requestsToDisplayDropdown" placeholder="{{'Requests.RequestsToDisplay' | translate}}" [(value)]="gridCount" (selectionChange)="ngAfterViewInit()">
|
||||
<mat-option value="10">10</mat-option>
|
||||
<mat-option value="15">15</mat-option>
|
||||
<mat-option value="30">30</mat-option>
|
||||
<mat-option value="100">100</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<table mat-table [dataSource]="dataSource" class="requests table" matSort [matSortActive]="defaultSort" matSortDisableClear [matSortDirection]="defaultOrder">
|
||||
|
||||
<ng-container matColumnDef="select" *ngIf="isAdmin">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<mat-checkbox id="adminMasterCheckbox" (change)="$event ? masterToggle() : null"
|
||||
[checked]="selection.hasValue() && isAllSelected()"
|
||||
[indeterminate]="selection.hasValue() && !isAllSelected()">
|
||||
</mat-checkbox>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<mat-checkbox id="adminMasterCheckbox{{row.id}}" (click)="$event.stopPropagation()"
|
||||
(change)="$event ? selection.toggle(row) : null"
|
||||
[checked]="selection.isSelected(row)">
|
||||
</mat-checkbox>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.RequestsTitle' | translate}} </th>
|
||||
<td mat-cell id="title{{element.id}}" *matCellDef="let element"> {{element.title}} ({{element.releaseDate | amLocal | amDateFormat: 'YYYY'}}) </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedUser.requestedBy">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'Requests.RequestedBy' | translate}} </th>
|
||||
<td mat-cell id="requestedBy{{element.id}}" *matCellDef="let element"> {{element.requestedByAlias ? element.requestedByAlias : element.requestedUser?.userAlias}} </td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<ng-container matColumnDef="requestedDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.RequestDate' | translate}} </th>
|
||||
<td mat-cell id="requestedDate{{element.id}}" *matCellDef="let element"> {{getRequestDate(element) | amLocal | amUserLocale | amDateFormat: 'LL'}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.Status' | translate}} </th>
|
||||
<td mat-cell id="status{{element.id}}" *matCellDef="let element"> {{element.status |translateStatus }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="has4kRequest">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.Has4KRequest' | translate}} </th>
|
||||
<td mat-cell id="has4kRequest{{element.id}}" *matCellDef="let element">
|
||||
<i *ngIf="element.has4KRequest" class="fas fa-check"></i>
|
||||
<i *ngIf="!element.has4KRequest" class="fas fa-times"></i>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<ng-container matColumnDef="requestStatus">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.RequestStatus' | translate}} </th>
|
||||
<td mat-cell id="requestedStatus{{element.id}}" *matCellDef="let element"> {{element.requestStatus | translate}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="watchedByRequestedUser">
|
||||
<th
|
||||
mat-header-cell
|
||||
*matHeaderCellDef
|
||||
disableClear
|
||||
matTooltip="{{ 'Requests.WatchedTooltip' | translate}}">
|
||||
{{ 'Requests.Watched' | translate}}
|
||||
</th>
|
||||
<td mat-cell id="watchedByRequestedUser{{element.id}}" *matCellDef="let element">
|
||||
<mat-checkbox
|
||||
[checked]="element.watchedByRequestedUser"
|
||||
disabled="true"
|
||||
matTooltip="{{'Requests.WatchedByUsersCount' | translate: {count: element.playedByUsersCount} }}">
|
||||
</mat-checkbox>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef> </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a id="detailsButton{{element.id}}" mat-raised-button color="accent" [routerLink]="'/details/movie/' + element.theMovieDbId">{{ 'Requests.Details' | translate}}</a>
|
||||
<a id="optionsButton{{element.id}}" mat-raised-button color="warn" (click)="openOptions(element)" *ngIf="isAdmin || ( manageOwnRequests && element.requestedUser?.userName == userName ) "> {{ 'Requests.Options' | translate}}</a>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="resultsLength" [pageSize]="gridCount"></mat-paginator>
|
||||
<grid-spinner [loading]="isLoadingResults"></grid-spinner>
|
||||
|
||||
<!-- <div class="row"> -->
|
||||
<div class="row justify-content-md-center top-spacing">
|
||||
<div class="btn-group" role="group">
|
||||
<button
|
||||
type="button"
|
||||
id="filterAll"
|
||||
(click)="switchFilter(RequestFilter.All)"
|
||||
[attr.color]="currentFilter === RequestFilter.All ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.All ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.AllRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterPending"
|
||||
(click)="switchFilter(RequestFilter.Pending)"
|
||||
[attr.color]="currentFilter === RequestFilter.Pending ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Pending ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.PendingRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterProcessing"
|
||||
(click)="switchFilter(RequestFilter.Processing)"
|
||||
[attr.color]="currentFilter === RequestFilter.Processing ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Processing ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.ProcessingRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterAvailable"
|
||||
(click)="switchFilter(RequestFilter.Available)"
|
||||
[attr.color]="currentFilter === RequestFilter.Available ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Available ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.AvailableRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterDenied"
|
||||
(click)="switchFilter(RequestFilter.Denied)"
|
||||
[attr.color]="currentFilter === RequestFilter.Denied ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Denied ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.DeniedRequests' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2 offset-md-10">
|
||||
<mat-form-field>
|
||||
<mat-select
|
||||
id="requestsToDisplayDropdown"
|
||||
placeholder="{{ 'Requests.RequestsToDisplay' | translate }}"
|
||||
[(value)]="gridCount"
|
||||
(selectionChange)="ngAfterViewInit()"
|
||||
>
|
||||
<mat-option value="10">10</mat-option>
|
||||
<mat-option value="15">15</mat-option>
|
||||
<mat-option value="30">30</mat-option>
|
||||
<mat-option value="100">100</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<table
|
||||
mat-table
|
||||
[dataSource]="dataSource"
|
||||
class="requests table"
|
||||
matSort
|
||||
[matSortActive]="defaultSort"
|
||||
matSortDisableClear
|
||||
[matSortDirection]="defaultOrder"
|
||||
>
|
||||
<ng-container matColumnDef="select" *ngIf="isAdmin">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<mat-checkbox
|
||||
id="adminMasterCheckbox"
|
||||
(change)="$event ? masterToggle() : null"
|
||||
[checked]="selection.hasValue() && isAllSelected()"
|
||||
[indeterminate]="selection.hasValue() && !isAllSelected()"
|
||||
>
|
||||
</mat-checkbox>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<mat-checkbox
|
||||
id="adminMasterCheckbox{{ row.id }}"
|
||||
(click)="$event.stopPropagation()"
|
||||
(change)="$event ? selection.toggle(row) : null"
|
||||
[checked]="selection.isSelected(row)"
|
||||
>
|
||||
</mat-checkbox>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.RequestsTitle' | translate }}</th>
|
||||
<td mat-cell id="title{{ element.id }}" *matCellDef="let element">{{ element.title }} ({{ element.releaseDate | dfnsFormat: 'P' }})</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedUser.requestedBy">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.RequestedBy' | translate }}</th>
|
||||
<td mat-cell id="requestedBy{{ element.id }}" *matCellDef="let element">
|
||||
{{ element.requestedByAlias ? element.requestedByAlias : element.requestedUser?.userAlias }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.RequestDate' | translate }}</th>
|
||||
<td mat-cell id="requestedDate{{ element.id }}" *matCellDef="let element">{{ getRequestDate(element) | dfnsFormat: 'PP' }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.Status' | translate }}</th>
|
||||
<td mat-cell id="status{{ element.id }}" *matCellDef="let element">{{ element.status | translateStatus }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="has4kRequest">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.Has4KRequest' | translate }}</th>
|
||||
<td mat-cell id="has4kRequest{{ element.id }}" *matCellDef="let element">
|
||||
<i *ngIf="element.has4KRequest" class="fas fa-check"></i>
|
||||
<i *ngIf="!element.has4KRequest" class="fas fa-times"></i>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestStatus">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.RequestStatus' | translate }}</th>
|
||||
<td mat-cell id="requestedStatus{{ element.id }}" *matCellDef="let element">{{ element.requestStatus | translate }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="watchedByRequestedUser">
|
||||
<th mat-header-cell *matHeaderCellDef disableClear matTooltip="{{ 'Requests.WatchedTooltip' | translate }}">
|
||||
{{ 'Requests.Watched' | translate }}
|
||||
</th>
|
||||
<td mat-cell id="watchedByRequestedUser{{ element.id }}" *matCellDef="let element">
|
||||
<mat-checkbox
|
||||
[checked]="element.watchedByRequestedUser"
|
||||
disabled="true"
|
||||
matTooltip="{{ 'Requests.WatchedByUsersCount' | translate: { count: element.playedByUsersCount } }}"
|
||||
>
|
||||
</mat-checkbox>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a id="detailsButton{{ element.id }}" mat-raised-button color="accent" [routerLink]="'/details/movie/' + element.theMovieDbId">{{
|
||||
'Requests.Details' | translate
|
||||
}}</a>
|
||||
<a
|
||||
id="optionsButton{{ element.id }}"
|
||||
mat-raised-button
|
||||
color="warn"
|
||||
(click)="openOptions(element)"
|
||||
*ngIf="isAdmin || (manageOwnRequests && element.requestedUser?.userName == userName)"
|
||||
>
|
||||
{{ 'Requests.Options' | translate }}</a
|
||||
>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="resultsLength" [pageSize]="gridCount"></mat-paginator>
|
||||
</div>
|
||||
|
||||
<button id="bulkFab" *ngIf="selection.hasValue() && isAdmin" mat-fab color="accent" class="floating-fab" [matMenuTriggerFor]="aboveMenu">
|
||||
<i class="fas fa-bars"></i></button>
|
||||
<mat-menu #aboveMenu="matMenu" yPosition="above">
|
||||
<button id="approveFabButton" mat-menu-item (click)="bulkApprove()">{{'Requests.RequestPanel.Approve' | translate}}</button>
|
||||
<button *ngIf="is4kEnabled" id="approve4kFabButton" mat-menu-item (click)="bulkApprove4K()">{{'Requests.RequestPanel.Approve4K' | translate}}</button>
|
||||
<button id="denyFabButton" mat-menu-item (click)="bulkDeny()">{{'Requests.RequestPanel.Deny' | translate}}</button>
|
||||
<button *ngIf="is4kEnabled" id="deny4kFabButton" mat-menu-item (click)="bulkDeny4K()">{{'Requests.RequestPanel.Deny4K' | translate}}</button>
|
||||
<button id="deleteFabButton" mat-menu-item (click)="bulkDelete()">{{'Requests.RequestPanel.Delete' | translate}}</button>
|
||||
</mat-menu>
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
<mat-menu #aboveMenu="matMenu" yPosition="above">
|
||||
<button id="approveFabButton" mat-menu-item (click)="bulkApprove()">{{ 'Requests.RequestPanel.Approve' | translate }}</button>
|
||||
<button *ngIf="is4kEnabled" id="approve4kFabButton" mat-menu-item (click)="bulkApprove4K()">
|
||||
{{ 'Requests.RequestPanel.Approve4K' | translate }}
|
||||
</button>
|
||||
<button id="denyFabButton" mat-menu-item (click)="bulkDeny()">{{ 'Requests.RequestPanel.Deny' | translate }}</button>
|
||||
<button *ngIf="is4kEnabled" id="deny4kFabButton" mat-menu-item (click)="bulkDeny4K()">{{ 'Requests.RequestPanel.Deny4K' | translate }}</button>
|
||||
<button id="deleteFabButton" mat-menu-item (click)="bulkDelete()">{{ 'Requests.RequestPanel.Delete' | translate }}</button>
|
||||
</mat-menu>
|
||||
|
@ -1,89 +1,152 @@
|
||||
<div class="mat-elevation-z8">
|
||||
<grid-spinner [loading]="isLoadingResults"></grid-spinner>
|
||||
|
||||
<grid-spinner [loading]="isLoadingResults"></grid-spinner>
|
||||
<div class="row justify-content-md-center top-spacing">
|
||||
<div class="btn-group" role="group">
|
||||
<button
|
||||
type="button"
|
||||
id="filterAll"
|
||||
(click)="switchFilter(RequestFilter.All)"
|
||||
[attr.color]="currentFilter === RequestFilter.All ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.All ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.AllRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterPending"
|
||||
(click)="switchFilter(RequestFilter.Pending)"
|
||||
[attr.color]="currentFilter === RequestFilter.Pending ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Pending ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.PendingRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterProcessing"
|
||||
(click)="switchFilter(RequestFilter.Processing)"
|
||||
[attr.color]="currentFilter === RequestFilter.Processing ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Processing ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.ProcessingRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterAvailable"
|
||||
(click)="switchFilter(RequestFilter.Available)"
|
||||
[attr.color]="currentFilter === RequestFilter.Available ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Available ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.AvailableRequests' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="filterDenied"
|
||||
(click)="switchFilter(RequestFilter.Denied)"
|
||||
[attr.color]="currentFilter === RequestFilter.Denied ? 'accent' : 'primary'"
|
||||
[ngClass]="currentFilter === RequestFilter.Denied ? 'mat-accent' : 'mat-primary'"
|
||||
mat-raised-button
|
||||
class="grow"
|
||||
>
|
||||
{{ 'Requests.DeniedRequests' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2 offset-md-10">
|
||||
<mat-form-field>
|
||||
<mat-select
|
||||
id="requestsToDisplayDropdown"
|
||||
placeholder="{{ 'Requests.RequestsToDisplay' | translate }}"
|
||||
[(value)]="gridCount"
|
||||
(selectionChange)="ngAfterViewInit()"
|
||||
>
|
||||
<mat-option value="10">10</mat-option>
|
||||
<mat-option value="15">15</mat-option>
|
||||
<mat-option value="30">30</mat-option>
|
||||
<mat-option value="100">100</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-md-center top-spacing">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" id="filterAll" (click)="switchFilter(RequestFilter.All)" [attr.color]="currentFilter === RequestFilter.All ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.All ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.AllRequests' | translate}}</button>
|
||||
<button type="button" id="filterPending" (click)="switchFilter(RequestFilter.Pending)" [attr.color]="currentFilter === RequestFilter.Pending ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Pending ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.PendingRequests' | translate}}</button>
|
||||
<button type="button" id="filterProcessing" (click)="switchFilter(RequestFilter.Processing)" [attr.color]="currentFilter === RequestFilter.Processing ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Processing ? 'mat-accent' : 'mat-primary'" mat-raised-button
|
||||
class="grow">{{'Requests.ProcessingRequests' | translate}}</button>
|
||||
<button type="button" id="filterAvailable" (click)="switchFilter(RequestFilter.Available)" [attr.color]="currentFilter === RequestFilter.Available ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Available ? 'mat-accent' : 'mat-primary'" mat-raised-button
|
||||
class="grow">{{'Requests.AvailableRequests' | translate}}</button>
|
||||
<button type="button" id="filterDenied" (click)="switchFilter(RequestFilter.Denied)" [attr.color]="currentFilter === RequestFilter.Denied ? 'accent' : 'primary'" [ngClass]="currentFilter === RequestFilter.Denied ? 'mat-accent' : 'mat-primary'" mat-raised-button class="grow">{{'Requests.DeniedRequests' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<table
|
||||
mat-table
|
||||
[dataSource]="dataSource"
|
||||
class="requests table"
|
||||
matSort
|
||||
[matSortActive]="defaultSort"
|
||||
matSortDisableClear
|
||||
[matSortDirection]="defaultOrder"
|
||||
>
|
||||
<ng-container matColumnDef="series">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.RequestsTitle' | translate }}</th>
|
||||
<td mat-cell id="title{{ element.id }}" *matCellDef="let element">{{ element.parentRequest.title }}</td>
|
||||
</ng-container>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2 offset-md-10">
|
||||
<mat-form-field>
|
||||
<mat-select id="requestsToDisplayDropdown" placeholder="{{'Requests.RequestsToDisplay' | translate}}" [(value)]="gridCount" (selectionChange)="ngAfterViewInit()">
|
||||
<mat-option value="10">10</mat-option>
|
||||
<mat-option value="15">15</mat-option>
|
||||
<mat-option value="30">30</mat-option>
|
||||
<mat-option value="100">100</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container matColumnDef="requestedBy">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.RequestedBy' | translate }}</th>
|
||||
<td mat-cell id="requestedBy{{ element.id }}" *matCellDef="let element">
|
||||
{{ element.requestedByAlias ? element.requestedByAlias : element.requestedUser.userAlias }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<table mat-table [dataSource]="dataSource" class="requests table" matSort [matSortActive]="defaultSort" matSortDisableClear [matSortDirection]="defaultOrder">
|
||||
<ng-container matColumnDef="requestedDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>{{ 'Requests.RequestDate' | translate }}</th>
|
||||
<td id="requestedDate{{ element.id }}" mat-cell *matCellDef="let element">
|
||||
{{ element.requestedDate | dfnsFormat: 'PP' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestStatus">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.RequestStatus' | translate }}</th>
|
||||
<td mat-cell id="requestedStatus{{ element.id }}" *matCellDef="let element">{{ element.requestStatus | translate }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="series">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'Requests.RequestsTitle' | translate}} </th>
|
||||
<td mat-cell id="title{{element.id}}" *matCellDef="let element"> {{element.parentRequest.title}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'Requests.Status' | translate }}</th>
|
||||
<td mat-cell id="status{{ element.id }}" *matCellDef="let element">
|
||||
{{ element.parentRequest.status | translateStatus }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedBy">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'Requests.RequestedBy' | translate}} </th>
|
||||
<td mat-cell id="requestedBy{{element.id}}" *matCellDef="let element"> {{element.requestedByAlias ? element.requestedByAlias : element.requestedUser.userAlias}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="watchedByRequestedUser">
|
||||
<th mat-header-cell *matHeaderCellDef disableClear matTooltip="{{ 'Requests.WatchedProgressTooltip' | translate }}">
|
||||
{{ 'Requests.Watched' | translate }}
|
||||
</th>
|
||||
<td mat-cell id="requestedUserPlayedProgress{{ element.id }}" *matCellDef="let element">
|
||||
<mat-progress-bar mode="determinate" value="{{ element.requestedUserPlayedProgress }}" class="played-progress"></mat-progress-bar>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestedDate">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{'Requests.RequestDate' | translate}} </th>
|
||||
<td id="requestedDate{{element.id}}" mat-cell *matCellDef="let element">
|
||||
{{element.requestedDate | amLocal | amUserLocale | amDateFormat: 'LL'}}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a
|
||||
id="detailsButton{{ element.id }}"
|
||||
mat-raised-button
|
||||
color="accent"
|
||||
[routerLink]="'/details/tv/' + element.parentRequest.externalProviderId"
|
||||
>{{ 'Requests.Details' | translate }}</a
|
||||
>
|
||||
<button id="optionsButton{{ element.id }}" mat-raised-button color="warn" (click)="openOptions(element)" *ngIf="isAdmin">
|
||||
{{ 'Requests.Options' | translate }}
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="requestStatus">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'Requests.RequestStatus' | translate}} </th>
|
||||
<td mat-cell id="requestedStatus{{element.id}}" *matCellDef="let element"> {{element.requestStatus | translate}} </td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef> {{'Requests.Status' | translate}} </th>
|
||||
<td mat-cell id="status{{element.id}}" *matCellDef="let element">
|
||||
{{element.parentRequest.status | translateStatus }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="watchedByRequestedUser">
|
||||
<th
|
||||
mat-header-cell
|
||||
*matHeaderCellDef
|
||||
disableClear
|
||||
matTooltip="{{ 'Requests.WatchedProgressTooltip' | translate}}">
|
||||
{{ 'Requests.Watched' | translate}}
|
||||
</th>
|
||||
<td mat-cell id="requestedUserPlayedProgress{{element.id}}" *matCellDef="let element">
|
||||
<mat-progress-bar mode="determinate" value="{{element.requestedUserPlayedProgress}}" class="played-progress"></mat-progress-bar>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef> </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a id="detailsButton{{element.id}}" mat-raised-button color="accent" [routerLink]="'/details/tv/' + element.parentRequest.externalProviderId">{{'Requests.Details' | translate}}</a>
|
||||
<button id="optionsButton{{element.id}}" mat-raised-button color="warn" (click)="openOptions(element)" *ngIf="isAdmin">{{'Requests.Options' | translate}}</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="resultsLength" [pageSize]="gridCount"></mat-paginator>
|
||||
<mat-paginator [length]="resultsLength" [pageSize]="gridCount"></mat-paginator>
|
||||
</div>
|
||||
|
@ -1,288 +1,316 @@
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" id="search" class="form-control form-control-custom searchwidth" [placeholder]="'Search.Search' | translate"
|
||||
(keyup)="search($event)">
|
||||
<span class="input-group-btn">
|
||||
<button id="filterBtn" class="btn btn-sm btn-info-outline" (click)="filterDisplay = !filterDisplay">
|
||||
<i class="fas fa-filter"></i> {{ 'Requests.Filter' | translate }}
|
||||
</button>
|
||||
|
||||
|
||||
<button class="btn btn-sm btn-primary-outline dropdown-toggle" type="button" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="true">
|
||||
<i class="fas fa-sort"></i> {{ 'Requests.Sort' | translate }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
|
||||
<li>
|
||||
<a (click)="setOrder(OrderType.RequestedDateAsc, $event)">{{ 'Requests.SortRequestDateAsc' |
|
||||
translate }}
|
||||
|
||||
</a>
|
||||
<a class="active" (click)="setOrder(OrderType.RequestedDateDesc, $event)">{{
|
||||
'Requests.SortRequestDateDesc' | translate }}
|
||||
|
||||
</a>
|
||||
<a (click)="setOrder(OrderType.TitleAsc, $event)">{{ 'Requests.SortTitleAsc' | translate}}
|
||||
|
||||
</a>
|
||||
<a (click)="setOrder(OrderType.TitleDesc, $event)">{{ 'Requests.SortTitleDesc' | translate}}
|
||||
|
||||
</a>
|
||||
<a (click)="setOrder(OrderType.StatusAsc, $event)">{{ 'Requests.SortStatusAsc' | translate}}
|
||||
|
||||
</a>
|
||||
<a (click)="setOrder(OrderType.StatusDesc, $event)">{{ 'Requests.SortStatusDesc' | translate}}
|
||||
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
id="search"
|
||||
class="form-control form-control-custom searchwidth"
|
||||
[placeholder]="'Search.Search' | translate"
|
||||
(keyup)="search($event)"
|
||||
/>
|
||||
<span class="input-group-btn">
|
||||
<button id="filterBtn" class="btn btn-sm btn-info-outline" (click)="filterDisplay = !filterDisplay">
|
||||
<i class="fas fa-filter"></i> {{ 'Requests.Filter' | translate }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="btn btn-sm btn-primary-outline dropdown-toggle"
|
||||
type="button"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="true"
|
||||
>
|
||||
<i class="fas fa-sort"></i> {{ 'Requests.Sort' | translate }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
|
||||
<li>
|
||||
<a (click)="setOrder(OrderType.RequestedDateAsc, $event)">{{ 'Requests.SortRequestDateAsc' | translate }} </a>
|
||||
<a class="active" (click)="setOrder(OrderType.RequestedDateDesc, $event)">{{ 'Requests.SortRequestDateDesc' | translate }} </a>
|
||||
<a (click)="setOrder(OrderType.TitleAsc, $event)">{{ 'Requests.SortTitleAsc' | translate }} </a>
|
||||
<a (click)="setOrder(OrderType.TitleDesc, $event)">{{ 'Requests.SortTitleDesc' | translate }} </a>
|
||||
<a (click)="setOrder(OrderType.StatusAsc, $event)">{{ 'Requests.SortStatusAsc' | translate }} </a>
|
||||
<a (click)="setOrder(OrderType.StatusDesc, $event)">{{ 'Requests.SortStatusDesc' | translate }} </a>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
<div>
|
||||
<div *ngFor="let request of movieRequests">
|
||||
<div class="row">
|
||||
<div class="myBg backdrop" [style.background-image]="request.backgroundPath"></div>
|
||||
<div class="tint" style="background-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%,rgba(0,0,0,0.6) 100%);"></div>
|
||||
<div class="col-sm-2 small-padding">
|
||||
|
||||
<img class="img-responsive poster" src="{{request.posterPath}}" alt="poster">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-5 small-padding">
|
||||
<div>
|
||||
<a href="http://www.imdb.com/title/{{request.imdbId}}/" target="_blank">
|
||||
<h4 class="request-title">{{request.title}} ({{request.releaseDate | amLocal | amDateFormat:
|
||||
'YYYY'}})</h4>
|
||||
</a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="request-info">
|
||||
<div class="request-by">
|
||||
<span>{{ 'Requests.RequestedBy' | translate }} </span>
|
||||
<span *ngIf="request.requestedByAlias">{{request.requestedByAlias}}</span>
|
||||
<span *ngIf="!request.requestedByAlias">
|
||||
<span *ngIf="!isAdmin">{{request.requestedUser.userName}}</span>
|
||||
<span *ngIf="isAdmin && request.requestedUser.alias">{{request.requestedUser.alias}}</span>
|
||||
<span *ngIf="isAdmin && !request.requestedUser.alias">{{request.requestedUser.userName}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="request-status">
|
||||
<span>{{ 'Requests.Status' | translate }} </span>
|
||||
<span class="label label-success" id="requestedStatusLabel">{{request.status}}</span>
|
||||
</div>
|
||||
|
||||
<div class="requested-status">
|
||||
<span>{{ 'Requests.RequestStatus' | translate }} </span>
|
||||
<span *ngIf="request.available" class="label label-success" id="availableLabel" [translate]="'Common.Available'"></span>
|
||||
<span *ngIf="request.approved && !request.available" id="processingRequestLabel" class="label label-info"
|
||||
[translate]="'Common.ProcessingRequest'"></span>
|
||||
<span *ngIf="request.denied" class="label label-danger" id="requestDeclinedLabel" [translate]="'Common.RequestDenied'"></span>
|
||||
<span *ngIf="!request.approved && !request.availble && !request.denied" id="pendingApprovalLabel"
|
||||
class="label label-warning" [translate]="'Common.PendingApproval'"></span>
|
||||
|
||||
</div>
|
||||
<div *ngIf="request.denied" id="requestDenied">
|
||||
{{ 'Requests.Denied' | translate }}
|
||||
<i style="color:red;" class="fas fa-check" pTooltip="{{request.deniedReason}}"></i>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="releaseDate">{{ 'Requests.TheatricalRelease' | translate: {date: request.releaseDate |
|
||||
amLocal | amUserLocale | amDateFormat: 'LL'} }}</div>
|
||||
<div *ngIf="request.digitalReleaseDate" id="digitalReleaseDate">{{ 'Requests.DigitalRelease' |
|
||||
translate: {date: request.digitalReleaseDate | amLocal | amUserLocale | amDateFormat: 'LL'} }}</div>
|
||||
<div id="requestedDate">{{ 'Requests.RequestDate' | translate }} {{request.requestedDate | amLocal
|
||||
| amUserLocale | amDateFormat: 'LL'}}</div>
|
||||
<br />
|
||||
</div>
|
||||
<div *ngIf="isAdmin">
|
||||
<div *ngIf="request.qualityOverrideTitle" class="quality-override">{{ 'Requests.QualityOverride' |
|
||||
translate }}
|
||||
<span>{{request.qualityOverrideTitle}} </span>
|
||||
</div>
|
||||
<div *ngIf="request.rootPathOverrideTitle" class="root-override">{{ 'Requests.RootFolderOverride' |
|
||||
translate }}
|
||||
<span>{{request.rootPathOverrideTitle}} </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-3 col-sm-push-3 small-padding">
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-md-push-6">
|
||||
|
||||
<a *ngIf="request.showSubscribe && !request.subscribed" style="color:white" (click)="subscribe(request)"
|
||||
pTooltip="Subscribe for notifications">
|
||||
<i class="fas fa-rss"></i>
|
||||
</a>
|
||||
<a *ngIf="request.showSubscribe && request.subscribed" style="color:red" (click)="unSubscribe(request)"
|
||||
pTooltip="Unsubscribe notification">
|
||||
<i class="fas fa-rss"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="isAdmin">
|
||||
<div *ngIf="!request.approved" id="approveBtn">
|
||||
<form>
|
||||
<button (click)="approve(request)" style="text-align: right" class="btn btn-sm btn-success-outline approve"
|
||||
type="submit">
|
||||
<i class="fas fa-plus"></i> {{ 'Common.Approve' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!--Radarr Root Folder-->
|
||||
<div *ngIf="radarrRootFolders?.length > 1" class="btn-group btn-split" id="rootFolderBtn">
|
||||
<button type="button" class="btn btn-sm btn-warning-outline">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.ChangeRootFolder' | translate }}
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning-outline dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li *ngFor="let folder of radarrRootFolders">
|
||||
<a href="#" (click)="selectRootFolder(request, folder, $event)">{{folder.path}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!--Radarr Quality Profiles -->
|
||||
<div *ngIf="radarrProfiles?.length > 1" class="btn-group btn-split" id="changeQualityBtn">
|
||||
<button type="button" class="btn btn-sm btn-warning-outline">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.ChangeQualityProfile' | translate }}
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning-outline dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li *ngFor="let profile of radarrProfiles">
|
||||
<a href="#" (click)="selectQualityProfile(request, profile, $event)">{{profile.name}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!request.denied" id="denyBtn">
|
||||
<button type="button" (click)="deny(request)" class="btn btn-sm btn-danger-outline deny">
|
||||
<i class="fas fa-times"></i> {{ 'Requests.Deny' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<form id="markBtnGroup">
|
||||
<button id="unavailableBtn" *ngIf="request.available" (click)="changeAvailability(request, false)"
|
||||
style="text-align: right" value="false" class="btn btn-sm btn-info-outline change">
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable' | translate }}
|
||||
</button>
|
||||
<button id="availableBtn" *ngIf="!request.available" (click)="changeAvailability(request, true)"
|
||||
style="text-align: right" value="true" class="btn btn-sm btn-success-outline change">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="isAdmin || isRequestUser(request)">
|
||||
<form>
|
||||
<button id="removeBtn" (click)="removeRequest(request)" style="text-align: right" class="btn btn-sm btn-danger-outline delete">
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.Remove' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dropdown" *ngIf="issueCategories && issuesEnabled" id="issuesBtn">
|
||||
<button class="btn btn-sm btn-primary-outline dropdown-toggle" type="button" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="true">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.ReportIssue' | translate }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<li *ngFor="let cat of issueCategories">
|
||||
<a [routerLink]="" (click)="reportIssue(cat, request)">{{cat.value}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<p-paginator [rows]="10" [totalRecords]="totalMovies" (onPageChange)="paginate($event)"></p-paginator>
|
||||
<div *ngFor="let request of movieRequests">
|
||||
<div class="row">
|
||||
<div class="myBg backdrop" [style.background-image]="request.backgroundPath"></div>
|
||||
<div class="tint" style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 100%)"></div>
|
||||
<div class="col-sm-2 small-padding">
|
||||
<img class="img-responsive poster" src="{{ request.posterPath }}" alt="poster" />
|
||||
</div>
|
||||
|
||||
<div class="col-sm-5 small-padding">
|
||||
<div>
|
||||
<a href="http://www.imdb.com/title/{{ request.imdbId }}/" target="_blank">
|
||||
<h4 class="request-title">{{ request.title }} ({{ request.releaseDate | dfnsFormat: 'P' }})</h4>
|
||||
</a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="request-info">
|
||||
<div class="request-by">
|
||||
<span>{{ 'Requests.RequestedBy' | translate }} </span>
|
||||
<span *ngIf="request.requestedByAlias">{{ request.requestedByAlias }}</span>
|
||||
<span *ngIf="!request.requestedByAlias">
|
||||
<span *ngIf="!isAdmin">{{ request.requestedUser.userName }}</span>
|
||||
<span *ngIf="isAdmin && request.requestedUser.alias">{{ request.requestedUser.alias }}</span>
|
||||
<span *ngIf="isAdmin && !request.requestedUser.alias">{{ request.requestedUser.userName }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="request-status">
|
||||
<span>{{ 'Requests.Status' | translate }} </span>
|
||||
<span class="label label-success" id="requestedStatusLabel">{{ request.status }}</span>
|
||||
</div>
|
||||
|
||||
<div class="requested-status">
|
||||
<span>{{ 'Requests.RequestStatus' | translate }} </span>
|
||||
<span *ngIf="request.available" class="label label-success" id="availableLabel" [translate]="'Common.Available'"></span>
|
||||
<span
|
||||
*ngIf="request.approved && !request.available"
|
||||
id="processingRequestLabel"
|
||||
class="label label-info"
|
||||
[translate]="'Common.ProcessingRequest'"
|
||||
></span>
|
||||
<span *ngIf="request.denied" class="label label-danger" id="requestDeclinedLabel" [translate]="'Common.RequestDenied'"></span>
|
||||
<span
|
||||
*ngIf="!request.approved && !request.availble && !request.denied"
|
||||
id="pendingApprovalLabel"
|
||||
class="label label-warning"
|
||||
[translate]="'Common.PendingApproval'"
|
||||
></span>
|
||||
</div>
|
||||
<div *ngIf="request.denied" id="requestDenied">
|
||||
{{ 'Requests.Denied' | translate }}
|
||||
<i style="color: red" class="fas fa-check" pTooltip="{{ request.deniedReason }}"></i>
|
||||
</div>
|
||||
|
||||
<div id="releaseDate">
|
||||
{{ 'Requests.TheatricalRelease' | translate: { date: request.releaseDate | dfnsFormat: 'PP' } }}
|
||||
</div>
|
||||
<div *ngIf="request.digitalReleaseDate" id="digitalReleaseDate">
|
||||
{{ 'Requests.DigitalRelease' | translate: { date: request.digitalReleaseDate | dfnsFormat: 'PP' } }}
|
||||
</div>
|
||||
<div id="requestedDate">{{ 'Requests.RequestDate' | translate }} {{ request.requestedDate | dfnsFormat: 'PP' }}</div>
|
||||
<br />
|
||||
</div>
|
||||
<div *ngIf="isAdmin">
|
||||
<div *ngIf="request.qualityOverrideTitle" class="quality-override">
|
||||
{{ 'Requests.QualityOverride' | translate }}
|
||||
<span>{{ request.qualityOverrideTitle }} </span>
|
||||
</div>
|
||||
<div *ngIf="request.rootPathOverrideTitle" class="root-override">
|
||||
{{ 'Requests.RootFolderOverride' | translate }}
|
||||
<span>{{ request.rootPathOverrideTitle }} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 col-sm-push-3 small-padding">
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-md-push-6">
|
||||
<a
|
||||
*ngIf="request.showSubscribe && !request.subscribed"
|
||||
style="color: white"
|
||||
(click)="subscribe(request)"
|
||||
pTooltip="Subscribe for notifications"
|
||||
>
|
||||
<i class="fas fa-rss"></i>
|
||||
</a>
|
||||
<a
|
||||
*ngIf="request.showSubscribe && request.subscribed"
|
||||
style="color: red"
|
||||
(click)="unSubscribe(request)"
|
||||
pTooltip="Unsubscribe notification"
|
||||
>
|
||||
<i class="fas fa-rss"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="isAdmin">
|
||||
<div *ngIf="!request.approved" id="approveBtn">
|
||||
<form>
|
||||
<button (click)="approve(request)" style="text-align: right" class="btn btn-sm btn-success-outline approve" type="submit">
|
||||
<i class="fas fa-plus"></i> {{ 'Common.Approve' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!--Radarr Root Folder-->
|
||||
<div *ngIf="radarrRootFolders?.length > 1" class="btn-group btn-split" id="rootFolderBtn">
|
||||
<button type="button" class="btn btn-sm btn-warning-outline">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.ChangeRootFolder' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-warning-outline dropdown-toggle"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li *ngFor="let folder of radarrRootFolders">
|
||||
<a href="#" (click)="selectRootFolder(request, folder, $event)">{{ folder.path }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!--Radarr Quality Profiles -->
|
||||
<div *ngIf="radarrProfiles?.length > 1" class="btn-group btn-split" id="changeQualityBtn">
|
||||
<button type="button" class="btn btn-sm btn-warning-outline">
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.ChangeQualityProfile' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-warning-outline dropdown-toggle"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li *ngFor="let profile of radarrProfiles">
|
||||
<a href="#" (click)="selectQualityProfile(request, profile, $event)">{{ profile.name }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!request.denied" id="denyBtn">
|
||||
<button type="button" (click)="deny(request)" class="btn btn-sm btn-danger-outline deny">
|
||||
<i class="fas fa-times"></i> {{ 'Requests.Deny' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="markBtnGroup">
|
||||
<button
|
||||
id="unavailableBtn"
|
||||
*ngIf="request.available"
|
||||
(click)="changeAvailability(request, false)"
|
||||
style="text-align: right"
|
||||
value="false"
|
||||
class="btn btn-sm btn-info-outline change"
|
||||
>
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable' | translate }}
|
||||
</button>
|
||||
<button
|
||||
id="availableBtn"
|
||||
*ngIf="!request.available"
|
||||
(click)="changeAvailability(request, true)"
|
||||
style="text-align: right"
|
||||
value="true"
|
||||
class="btn btn-sm btn-success-outline change"
|
||||
>
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngIf="isAdmin || isRequestUser(request)">
|
||||
<form>
|
||||
<button
|
||||
id="removeBtn"
|
||||
(click)="removeRequest(request)"
|
||||
style="text-align: right"
|
||||
class="btn btn-sm btn-danger-outline delete"
|
||||
>
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.Remove' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="dropdown" *ngIf="issueCategories && issuesEnabled" id="issuesBtn">
|
||||
<button
|
||||
class="btn btn-sm btn-primary-outline dropdown-toggle"
|
||||
type="button"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="true"
|
||||
>
|
||||
<i class="fas fa-plus"></i> {{ 'Requests.ReportIssue' | translate }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<li *ngFor="let cat of issueCategories">
|
||||
<a [routerLink]="" (click)="reportIssue(cat, request)">{{ cat.value }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<p-paginator [rows]="10" [totalRecords]="totalMovies" (onPageChange)="paginate($event)"></p-paginator>
|
||||
</div>
|
||||
|
||||
<p-dialog *ngIf="requestToDeny" header="Deny Request '{{requestToDeny.title}}''" [(visible)]="denyDisplay" [draggable]="false">
|
||||
<span>Please enter a rejection reason, the user will be notified of this:</span>
|
||||
<textarea [(ngModel)]="rejectionReason" class="form-control-custom form-control"></textarea>
|
||||
<p-footer>
|
||||
<button type="button" (click)="denyRequest();" label="Reject" class="btn btn-success">Deny</button>
|
||||
<button type="button" (click)="denyDisplay=false" label="Close" class="btn btn-danger">Close</button>
|
||||
</p-footer>
|
||||
<p-dialog *ngIf="requestToDeny" header="Deny Request '{{ requestToDeny.title }}''" [(visible)]="denyDisplay" [draggable]="false">
|
||||
<span>Please enter a rejection reason, the user will be notified of this:</span>
|
||||
<textarea [(ngModel)]="rejectionReason" class="form-control-custom form-control"></textarea>
|
||||
<p-footer>
|
||||
<button type="button" (click)="denyRequest()" label="Reject" class="btn btn-success">Deny</button>
|
||||
<button type="button" (click)="denyDisplay = false" label="Close" class="btn btn-danger">Close</button>
|
||||
</p-footer>
|
||||
</p-dialog>
|
||||
|
||||
<issue-report [movie]="true" [visible]="issuesBarVisible" (visibleChange)="issuesBarVisible = $event;" [title]="issueRequest?.title"
|
||||
[issueCategory]="issueCategorySelected" [id]="issueRequest?.id" [providerId]="issueProviderId"></issue-report>
|
||||
|
||||
<issue-report
|
||||
[movie]="true"
|
||||
[visible]="issuesBarVisible"
|
||||
(visibleChange)="issuesBarVisible = $event"
|
||||
[title]="issueRequest?.title"
|
||||
[issueCategory]="issueCategorySelected"
|
||||
[id]="issueRequest?.id"
|
||||
[providerId]="issueProviderId"
|
||||
></issue-report>
|
||||
|
||||
<p-sidebar [(visible)]="filterDisplay" styleClass="ui-sidebar-md side-back side-small">
|
||||
<h3>{{ 'Requests.Filter' | translate }}</h3>
|
||||
<hr>
|
||||
<div>
|
||||
<h4>{{ 'Filter.FilterHeaderAvailability' | translate }}</h4>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="Available" name="Availability" (click)="filterAvailability(filterType.Available, $event)">
|
||||
<label for="Available">{{ 'Common.Available' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="notAvailable" name="Availability" (click)="filterAvailability(filterType.NotAvailable, $event)">
|
||||
<label for="notAvailable">{{ 'Common.NotAvailable' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{ 'Filter.FilterHeaderRequestStatus' | translate }}</h4>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="approved" name="Status" (click)="filterStatus(filterType.Approved, $event)">
|
||||
<label for="approved">{{ 'Filter.Approved' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="Processing" name="Status" (click)="filterStatus(filterType.Processing, $event)">
|
||||
<label for="Processing">{{ 'Common.ProcessingRequest' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="pendingApproval" name="Status" (click)="filterStatus(filterType.PendingApproval, $event)">
|
||||
<label for="pendingApproval">{{ 'Filter.PendingApproval' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-sm btn-primary-outline" (click)="clearFilter($event)">
|
||||
<i class="fas fa-filter"></i> {{ 'Filter.ClearFilter' | translate }}</button>
|
||||
<h3>{{ 'Requests.Filter' | translate }}</h3>
|
||||
<hr />
|
||||
<div>
|
||||
<h4>{{ 'Filter.FilterHeaderAvailability' | translate }}</h4>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="Available" name="Availability" (click)="filterAvailability(filterType.Available, $event)" />
|
||||
<label for="Available">{{ 'Common.Available' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="notAvailable" name="Availability" (click)="filterAvailability(filterType.NotAvailable, $event)" />
|
||||
<label for="notAvailable">{{ 'Common.NotAvailable' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>{{ 'Filter.FilterHeaderRequestStatus' | translate }}</h4>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="approved" name="Status" (click)="filterStatus(filterType.Approved, $event)" />
|
||||
<label for="approved">{{ 'Filter.Approved' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="Processing" name="Status" (click)="filterStatus(filterType.Processing, $event)" />
|
||||
<label for="Processing">{{ 'Common.ProcessingRequest' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="pendingApproval" name="Status" (click)="filterStatus(filterType.PendingApproval, $event)" />
|
||||
<label for="pendingApproval">{{ 'Filter.PendingApproval' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-sm btn-primary-outline" (click)="clearFilter($event)">
|
||||
<i class="fas fa-filter"></i> {{ 'Filter.ClearFilter' | translate }}
|
||||
</button>
|
||||
</p-sidebar>
|
||||
|
@ -1,25 +1,29 @@
|
||||
<div class='container'>
|
||||
<div class='chatbox'>
|
||||
<div class='chatbox__user-list'>
|
||||
<h1>{{ "NavigationBar.UserManagement" | translate }}</h1>
|
||||
<div class='chatbox__user--active' *ngFor="let user of userList">
|
||||
<p>{{user}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chatbox-message-box">
|
||||
<div class="chatbox__messages" *ngFor="let m of messages">
|
||||
<div class="chatbox__messages__user-message">
|
||||
<div class="chatbox__messages__user-message--ind-message" [ngClass]="{'sender': m.chatType === ChatType.Sender, 'reciever':m.chatType === ChatType.Reciever }">
|
||||
<p class="name" *ngIf="m?.username">{{m.username}}</p>
|
||||
<br/>
|
||||
<p class="message">{{m.message}}</p>
|
||||
<p class="timestamp">{{m.date | amFromUtc | amLocal | amUserLocale | amDateFormat: 'l LT'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form">
|
||||
<input type="text" [(ngModel)]="currentMessage" [placeholder]="'Issues.EnterYourMessage' | translate">
|
||||
<button mat-raised-button class="add-message" (click)="addMessage()">{{ "Issues.SendMessageButton" | translate }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="chatbox">
|
||||
<div class="chatbox__user-list">
|
||||
<h1>{{ 'NavigationBar.UserManagement' | translate }}</h1>
|
||||
<div class="chatbox__user--active" *ngFor="let user of userList">
|
||||
<p>{{ user }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chatbox-message-box">
|
||||
<div class="chatbox__messages" *ngFor="let m of messages">
|
||||
<div class="chatbox__messages__user-message">
|
||||
<div
|
||||
class="chatbox__messages__user-message--ind-message"
|
||||
[ngClass]="{ sender: m.chatType === ChatType.Sender, reciever: m.chatType === ChatType.Reciever }"
|
||||
>
|
||||
<p class="name" *ngIf="m?.username">{{ m.username }}</p>
|
||||
<br />
|
||||
<p class="message">{{ m.message }}</p>
|
||||
<p class="timestamp">{{ m.date | dfnsFormat: 'Ppp' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form">
|
||||
<input type="text" [(ngModel)]="currentMessage" [placeholder]="'Issues.EnterYourMessage' | translate" />
|
||||
<button mat-raised-button class="add-message" (click)="addMessage()">{{ 'Issues.SendMessageButton' | translate }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,74 +1,93 @@
|
||||
<div mat-dialog-content class="background">
|
||||
<div *ngIf="!requestable">
|
||||
{{'MediaDetails.EpisodeSelector.NoEpisodes' | translate}}
|
||||
</div>
|
||||
<div *ngIf="requestable" class="row">
|
||||
<div class="col-12 action-buttons-right">
|
||||
<button id="episodeModalAllSeasons" (click)="requestAllSeasons()" color="primary" mat-raised-button class="btn-spacing"
|
||||
matTooltip="{{'MediaDetails.EpisodeSelector.AllSeasonsTooltip' | translate}}">{{'Search.TvShows.AllSeasons' | translate }}</button>
|
||||
|
||||
<button id="episodeModalFirstSeason" (click)="requestFirstSeason()" color="accent" mat-raised-button class="btn-spacing"
|
||||
matTooltip="{{'MediaDetails.EpisodeSelector.FirstSeasonTooltip' | translate}}">{{ 'Search.TvShows.FirstSeason' | translate }}</button>
|
||||
<button id="episodeModalLatestSeason" (click)="requestLatestSeason()" color="warn" mat-raised-button class="btn-spacing"
|
||||
matTooltip="{{'MediaDetails.EpisodeSelector.LatestSeasonTooltip' | translate}}">{{ 'Search.TvShows.LatestSeason' | translate }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" *ngFor="let season of data.series.seasonRequests">
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<mat-checkbox *ngIf="!season.seasonAvailable && isSeasonCheckable(season)" (click)="$event.stopPropagation();" (change)="seasonChanged($event, season)">
|
||||
{{ 'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber } }}</mat-checkbox>
|
||||
<span *ngIf="season.seasonAvailable || !isSeasonCheckable(season)">{{ 'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber } }}</span>
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
<!-- Description -->
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<div class="row" *ngFor="let ep of season.episodes">
|
||||
<div class="col-1">
|
||||
<div *ngIf="!ep.available && !ep.requested && !ep.approved">
|
||||
<mat-checkbox *ngIf="!ep.selected" [ngModel]="ep.selected" (click)="addRequest(ep)"></mat-checkbox>
|
||||
<mat-checkbox *ngIf="ep.selected" [ngModel]="ep.selected" (click)="removeRequest(ep)"></mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
{{ep.episodeNumber}}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ep.title}}
|
||||
</div>
|
||||
<div class="col-2" *ngIf="ep.airDateDisplay != 'Unknown'">
|
||||
{{ep.airDate | amLocal | amUserLocale | amDateFormat: 'L' }}
|
||||
</div>
|
||||
<div class="col-2" *ngIf="ep.airDateDisplay == 'Unknown'">
|
||||
{{ep.airDateDisplay }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ep.requestStatus | translate}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="!requestable">
|
||||
{{ 'MediaDetails.EpisodeSelector.NoEpisodes' | translate }}
|
||||
</div>
|
||||
<div *ngIf="requestable" class="row">
|
||||
<div class="col-12 action-buttons-right">
|
||||
<button
|
||||
id="episodeModalAllSeasons"
|
||||
(click)="requestAllSeasons()"
|
||||
color="primary"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
matTooltip="{{ 'MediaDetails.EpisodeSelector.AllSeasonsTooltip' | translate }}"
|
||||
>
|
||||
{{ 'Search.TvShows.AllSeasons' | translate }}
|
||||
</button>
|
||||
|
||||
</mat-expansion-panel>
|
||||
<button
|
||||
id="episodeModalFirstSeason"
|
||||
(click)="requestFirstSeason()"
|
||||
color="accent"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
matTooltip="{{ 'MediaDetails.EpisodeSelector.FirstSeasonTooltip' | translate }}"
|
||||
>
|
||||
{{ 'Search.TvShows.FirstSeason' | translate }}
|
||||
</button>
|
||||
<button
|
||||
id="episodeModalLatestSeason"
|
||||
(click)="requestLatestSeason()"
|
||||
color="warn"
|
||||
mat-raised-button
|
||||
class="btn-spacing"
|
||||
matTooltip="{{ 'MediaDetails.EpisodeSelector.LatestSeasonTooltip' | translate }}"
|
||||
>
|
||||
{{ 'Search.TvShows.LatestSeason' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" *ngFor="let season of data.series.seasonRequests">
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<mat-checkbox
|
||||
*ngIf="!season.seasonAvailable && isSeasonCheckable(season)"
|
||||
(click)="$event.stopPropagation()"
|
||||
(change)="seasonChanged($event, season)"
|
||||
>
|
||||
{{ 'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber } }}</mat-checkbox
|
||||
>
|
||||
<span *ngIf="season.seasonAvailable || !isSeasonCheckable(season)">{{
|
||||
'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber }
|
||||
}}</span>
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
<!-- Description -->
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row" *ngFor="let ep of season.episodes">
|
||||
<div class="col-1">
|
||||
<div *ngIf="!ep.available && !ep.requested && !ep.approved">
|
||||
<mat-checkbox *ngIf="!ep.selected" [ngModel]="ep.selected" (click)="addRequest(ep)"></mat-checkbox>
|
||||
<mat-checkbox *ngIf="ep.selected" [ngModel]="ep.selected" (click)="removeRequest(ep)"></mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
{{ ep.episodeNumber }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ ep.title }}
|
||||
</div>
|
||||
<div class="col-2" *ngIf="ep.airDateDisplay != 'Unknown'">
|
||||
{{ ep.airDate | dfnsFormat: 'P' }}
|
||||
</div>
|
||||
<div class="col-2" *ngIf="ep.airDateDisplay == 'Unknown'">
|
||||
{{ ep.airDateDisplay }}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ ep.requestStatus | translate }}
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div mat-dialog-actions *ngIf="requestable">
|
||||
<div class="action-buttons-right">
|
||||
|
||||
<button (click)="submitRequests()" mat-raised-button class="btn-spacing btn-orange">{{
|
||||
'Common.Request' | translate }}</button>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="action-buttons-right">
|
||||
<button (click)="submitRequests()" mat-raised-button class="btn-spacing btn-orange">{{ 'Common.Request' | translate }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,141 +1,141 @@
|
||||
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import { AdminRequestDialogComponent } from "./admin-request-dialog/admin-request-dialog.component";
|
||||
import { AdvancedSearchDialogComponent } from "./advanced-search-dialog/advanced-search-dialog.component";
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { DetailsGroupComponent } from "../issues/components/details-group/details-group.component";
|
||||
import { EpisodeRequestComponent } from "./episode-request/episode-request.component";
|
||||
import { GenreSelectComponent } from "./components/genre-select/genre-select.component";
|
||||
import { InputSwitchModule } from "primeng/inputswitch";
|
||||
import { IssuesReportComponent } from "./issues-report.component";
|
||||
import { KeywordSearchComponent } from "./components/keyword-search/keyword-search.component";
|
||||
import { MatAutocompleteModule } from "@angular/material/autocomplete";
|
||||
import { AdminRequestDialogComponent } from './admin-request-dialog/admin-request-dialog.component';
|
||||
import { AdvancedSearchDialogComponent } from './advanced-search-dialog/advanced-search-dialog.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DetailsGroupComponent } from '../issues/components/details-group/details-group.component';
|
||||
import { EpisodeRequestComponent } from './episode-request/episode-request.component';
|
||||
import { GenreSelectComponent } from './components/genre-select/genre-select.component';
|
||||
import { InputSwitchModule } from 'primeng/inputswitch';
|
||||
import { IssuesReportComponent } from './issues-report.component';
|
||||
import { KeywordSearchComponent } from './components/keyword-search/keyword-search.component';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from "@angular/material/card";
|
||||
import { MatCheckboxModule } from "@angular/material/checkbox";
|
||||
import { MatChipsModule } from "@angular/material/chips";
|
||||
import { MatDialogModule } from "@angular/material/dialog";
|
||||
import { MatExpansionModule } from "@angular/material/expansion";
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatExpansionModule } from '@angular/material/expansion';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from "@angular/material/input";
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
|
||||
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
||||
import {MatRadioModule} from '@angular/material/radio';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatSlideToggleModule } from "@angular/material/slide-toggle";
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { MatSortModule } from '@angular/material/sort';
|
||||
import { MatStepperModule } from '@angular/material/stepper';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MatTabsModule } from "@angular/material/tabs";
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatTreeModule } from '@angular/material/tree';
|
||||
import { MomentModule } from "ngx-moment";
|
||||
import { NgModule } from "@angular/core";
|
||||
import { PipeModule } from "../pipes/pipe.module";
|
||||
import { RoleModule } from "./role-directive/role.module";
|
||||
import { SidebarModule } from "primeng/sidebar";
|
||||
import { TranslateModule } from "@ngx-translate/core";
|
||||
import { TruncateModule } from "@yellowspot/ng-truncate";
|
||||
import { WatchProvidersSelectComponent } from "./components/watch-providers-select/watch-providers-select.component";
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PipeModule } from '../pipes/pipe.module';
|
||||
import { RoleModule } from './role-directive/role.module';
|
||||
import { SidebarModule } from 'primeng/sidebar';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { TruncateModule } from '@yellowspot/ng-truncate';
|
||||
import { WatchProvidersSelectComponent } from './components/watch-providers-select/watch-providers-select.component';
|
||||
import { DateFnsModule } from 'ngx-date-fns';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
IssuesReportComponent,
|
||||
EpisodeRequestComponent,
|
||||
DetailsGroupComponent,
|
||||
AdminRequestDialogComponent,
|
||||
AdvancedSearchDialogComponent,
|
||||
KeywordSearchComponent,
|
||||
GenreSelectComponent,
|
||||
WatchProvidersSelectComponent,
|
||||
],
|
||||
imports: [
|
||||
RoleModule,
|
||||
SidebarModule,
|
||||
ReactiveFormsModule,
|
||||
FormsModule,
|
||||
CommonModule,
|
||||
InputSwitchModule,
|
||||
TruncateModule,
|
||||
MomentModule,
|
||||
MatCardModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatProgressBarModule,
|
||||
MatAutocompleteModule,
|
||||
MatInputModule,
|
||||
MatTabsModule,
|
||||
MatRadioModule,
|
||||
MatButtonModule,
|
||||
MatNativeDateModule,
|
||||
MatChipsModule,
|
||||
MatIconModule,
|
||||
MatMenuModule,
|
||||
MatSidenavModule,
|
||||
MatListModule,
|
||||
MatToolbarModule,
|
||||
MatCheckboxModule,
|
||||
TranslateModule,
|
||||
MatExpansionModule,
|
||||
MatDialogModule,
|
||||
MatTooltipModule,
|
||||
MatSelectModule,
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatTreeModule,
|
||||
MatStepperModule,
|
||||
MatSnackBarModule,
|
||||
PipeModule,
|
||||
],
|
||||
exports: [
|
||||
RoleModule,
|
||||
TranslateModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
TranslateModule,
|
||||
SidebarModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatProgressBarModule,
|
||||
IssuesReportComponent,
|
||||
EpisodeRequestComponent,
|
||||
AdminRequestDialogComponent,
|
||||
AdvancedSearchDialogComponent,
|
||||
GenreSelectComponent,
|
||||
KeywordSearchComponent,
|
||||
WatchProvidersSelectComponent,
|
||||
DetailsGroupComponent,
|
||||
TruncateModule,
|
||||
InputSwitchModule,
|
||||
MatTreeModule,
|
||||
MomentModule,MatCardModule,
|
||||
MatInputModule,
|
||||
MatTabsModule,
|
||||
MatChipsModule,
|
||||
MatButtonModule,
|
||||
MatNativeDateModule,
|
||||
MatIconModule,
|
||||
MatMenuModule,
|
||||
MatSnackBarModule,
|
||||
MatSidenavModule,
|
||||
MatSelectModule,
|
||||
MatListModule,
|
||||
MatToolbarModule,
|
||||
MatTooltipModule,
|
||||
MatAutocompleteModule,
|
||||
MatCheckboxModule,
|
||||
MatExpansionModule,
|
||||
MatDialogModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatStepperModule,
|
||||
MatSlideToggleModule,
|
||||
],
|
||||
declarations: [
|
||||
IssuesReportComponent,
|
||||
EpisodeRequestComponent,
|
||||
DetailsGroupComponent,
|
||||
AdminRequestDialogComponent,
|
||||
AdvancedSearchDialogComponent,
|
||||
KeywordSearchComponent,
|
||||
GenreSelectComponent,
|
||||
WatchProvidersSelectComponent,
|
||||
],
|
||||
imports: [
|
||||
RoleModule,
|
||||
SidebarModule,
|
||||
ReactiveFormsModule,
|
||||
FormsModule,
|
||||
CommonModule,
|
||||
InputSwitchModule,
|
||||
TruncateModule,
|
||||
MatCardModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatProgressBarModule,
|
||||
MatAutocompleteModule,
|
||||
MatInputModule,
|
||||
MatTabsModule,
|
||||
MatRadioModule,
|
||||
MatButtonModule,
|
||||
MatNativeDateModule,
|
||||
MatChipsModule,
|
||||
MatIconModule,
|
||||
MatMenuModule,
|
||||
MatSidenavModule,
|
||||
MatListModule,
|
||||
MatToolbarModule,
|
||||
MatCheckboxModule,
|
||||
TranslateModule,
|
||||
MatExpansionModule,
|
||||
MatDialogModule,
|
||||
MatTooltipModule,
|
||||
MatSelectModule,
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatTreeModule,
|
||||
MatStepperModule,
|
||||
MatSnackBarModule,
|
||||
PipeModule,
|
||||
],
|
||||
exports: [
|
||||
RoleModule,
|
||||
TranslateModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
TranslateModule,
|
||||
SidebarModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatProgressBarModule,
|
||||
IssuesReportComponent,
|
||||
EpisodeRequestComponent,
|
||||
AdminRequestDialogComponent,
|
||||
AdvancedSearchDialogComponent,
|
||||
GenreSelectComponent,
|
||||
KeywordSearchComponent,
|
||||
WatchProvidersSelectComponent,
|
||||
DetailsGroupComponent,
|
||||
TruncateModule,
|
||||
InputSwitchModule,
|
||||
MatTreeModule,
|
||||
MatCardModule,
|
||||
MatInputModule,
|
||||
MatTabsModule,
|
||||
MatChipsModule,
|
||||
MatButtonModule,
|
||||
MatNativeDateModule,
|
||||
MatIconModule,
|
||||
MatMenuModule,
|
||||
MatSnackBarModule,
|
||||
MatSidenavModule,
|
||||
MatSelectModule,
|
||||
MatListModule,
|
||||
MatToolbarModule,
|
||||
MatTooltipModule,
|
||||
MatAutocompleteModule,
|
||||
MatCheckboxModule,
|
||||
MatExpansionModule,
|
||||
MatDialogModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatStepperModule,
|
||||
MatSlideToggleModule,
|
||||
DateFnsModule,
|
||||
],
|
||||
})
|
||||
export class SharedModule {}
|
||||
|
@ -1,5 +1,4 @@
|
||||
/***************************************************************************************************
|
||||
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
|
||||
*/
|
||||
import "core-js/es7/reflect";
|
||||
import "zone.js/dist/zone";
|
||||
import 'core-js/es7/reflect';
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue