Merge branch 'develop' of https://github.com/ombi-app/ombi into develop

pull/4913/head
tidusjar 2 years ago
commit 5f6eab09f9

@ -1,3 +1,21 @@
# [4.36.0](https://github.com/Ombi-app/Ombi/compare/v4.35.19...v4.36.0) (2023-04-20)
### Features
* **discover:** Add deny option to recently requested ([#4907](https://github.com/Ombi-app/Ombi/issues/4907)) ([78f340e](https://github.com/Ombi-app/Ombi/commit/78f340ee5f309c55690497170897533801957668))
## [4.35.19](https://github.com/Ombi-app/Ombi/compare/v4.35.18...v4.35.19) (2023-04-20)
### Bug Fixes
* **radarr:** Fixed an issue where the radarr sync would break ([de4baad](https://github.com/Ombi-app/Ombi/commit/de4baade9f87248d77106ff1a313a498870f4fb3))
## [4.35.18](https://github.com/Ombi-app/Ombi/compare/v4.35.17...v4.35.18) (2023-04-15)
@ -345,21 +363,3 @@
## [4.27.3](https://github.com/Ombi-app/Ombi/compare/v4.27.2...v4.27.3) (2022-09-30)
### Bug Fixes
* **availability:** 🐛 Fixed a issue with the availability checker after the previous update. Added full test coverage around that area ([28e2480](https://github.com/Ombi-app/Ombi/commit/28e248046ad56390595f84172bbd5f5961325b4d))
## [4.27.2](https://github.com/Ombi-app/Ombi/compare/v4.27.1...v4.27.2) (2022-09-29)
### Bug Fixes
* **sonarr:** :bug: Cleaned up and removed Sonarr v3 option, sonarr v3 is now the default. This allows us to get ready for the upcoming Sonarr v4 ([#4764](https://github.com/Ombi-app/Ombi/issues/4764)) ([2cddec7](https://github.com/Ombi-app/Ombi/commit/2cddec759004b6490f686ff74cb092238e3dc946))

@ -22,7 +22,23 @@
</div>
<div class="row action-items">
<div class="col-12" *ngIf="isAdmin">
<button *ngIf="!request.approved" id="detailed-request-approve-{{request.mediaId}}" color="accent" mat-raised-button (click)="approve()">{{'Common.Approve' | translate}}</button>
<div *ngIf="!request.approved && !request.denied">
<button
id="detailed-request-approve-{{request.mediaId}}"
color="accent"
mat-raised-button
(click)="approve()"
matTooltip="{{'Common.Approve' | translate}}">
<mat-icon>check-circle</mat-icon>
</button>
<button
id="detailed-request-deny-{{request.mediaId}}"
color="accent"
mat-raised-button
(click)="deny()"
matTooltip="{{'Requests.Deny' | translate}}">
<mat-icon>cancel</mat-icon></button>
</div>
</div>
</div>
</div>

@ -50,5 +50,9 @@
position: absolute;
}
}
.action-items button {
margin: 4px;
}
}

@ -22,6 +22,7 @@ export class DetailedCardComponent implements OnInit, OnDestroy {
@Input() public isAdmin: boolean = false;
@Output() public onClick: EventEmitter<void> = new EventEmitter<void>();
@Output() public onApprove: EventEmitter<void> = new EventEmitter<void>();
@Output() public onDeny: EventEmitter<void> = new EventEmitter<void>();
public RequestType = RequestType;
public loading: false;
@ -65,6 +66,10 @@ export class DetailedCardComponent implements OnInit, OnDestroy {
this.onApprove.emit();
}
public deny() {
this.onDeny.emit();
}
public getClass(request: IRecentlyRequested) {
if (request.denied) {
return "danger";

@ -3,9 +3,14 @@
<p-carousel #carousel [value]="requests" [numVisible]="3" [numScroll]="1"
[responsiveOptions]="responsiveOptions" [page]="0">
<ng-template let-result pTemplate="item">
<ombi-detailed-card [request]="result" [isAdmin]="isAdmin" (onClick)="navigate(result)"
(onApprove)="approve(result)"></ombi-detailed-card>
<ombi-detailed-card
[request]="result"
[isAdmin]="isAdmin"
(onClick)="navigate(result)"
(onApprove)="approve(result)"
(onDeny)="deny(result)">
</ombi-detailed-card>
</ng-template>
</p-carousel>
</div>
</div>
</div>

@ -8,6 +8,8 @@ import { Router } from "@angular/router";
import { AuthService } from "app/auth/auth.service";
import { NotificationService, RequestService } from "app/services";
import { TranslateService } from "@ngx-translate/core";
import { DenyDialogComponent } from '../../../media-details/components/shared/deny-dialog/deny-dialog.component';
import { MatDialog } from "@angular/material/dialog";
export enum DiscoverType {
Upcoming,
@ -42,7 +44,8 @@ export class RecentlyRequestedListComponent implements OnInit, OnDestroy {
private router: Router,
private authService: AuthService,
private notificationService: NotificationService,
private translateService: TranslateService) {
private translateService: TranslateService,
public dialog: MatDialog) {
Carousel.prototype.onTouchMove = () => {};
this.responsiveOptions = ResponsiveOptions;
}
@ -81,6 +84,20 @@ export class RecentlyRequestedListComponent implements OnInit, OnDestroy {
}
}
public deny(request: IRecentlyRequested) {
const dialogRef = this.dialog.open(DenyDialogComponent, {
width: '250px',
data: { requestId: request.requestId, is4K: false, requestType: request.type }
});
dialogRef.afterClosed().subscribe(result => {
if (result) {
this.notificationService.success(this.translateService.instant("Requests.SuccessfullyDenied"));
request.denied = true;
}
});
}
private handleApproval(result: IRequestEngineResult, request: IRecentlyRequested) {
if (result.result) {
this.notificationService.success(this.translateService.instant("Requests.SuccessfullyApproved"));

@ -221,6 +221,7 @@
"Denied": "Successfully denied selected items"
},
"SuccessfullyApproved": "Successfully Approved",
"SuccessfullyDenied": "Successfully Denied",
"SuccessfullyDeleted": "Request successfully deleted",
"NowAvailable": "Request is now available",
"NowUnavailable": "Request is now unavailable",

@ -1,3 +1,3 @@
{
"version": "4.35.18"
"version": "4.36.0"
}
Loading…
Cancel
Save