mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
feat: fixed the radarr ui
This commit is contained in:
parent
c6ce8fb052
commit
d500e1a9d6
5 changed files with 10 additions and 80 deletions
|
@ -56,7 +56,7 @@
|
||||||
<div class="md-form-field" style="margin-top:1em;"></div>
|
<div class="md-form-field" style="margin-top:1em;"></div>
|
||||||
<mat-form-field appearance="outline" >
|
<mat-form-field appearance="outline" >
|
||||||
<mat-label>Quality Profiles</mat-label>
|
<mat-label>Quality Profiles</mat-label>
|
||||||
<mat-select formControlName="defaultQualityProfile" required>
|
<mat-select formControlName="defaultQualityProfile">
|
||||||
<mat-option *ngFor="let quality of qualities" [value]="quality.id">
|
<mat-option *ngFor="let quality of qualities" [value]="quality.id">
|
||||||
{{quality.name}}
|
{{quality.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<div class="md-form-field" style="margin-top:1em;"></div>
|
<div class="md-form-field" style="margin-top:1em;"></div>
|
||||||
<mat-form-field appearance="outline" >
|
<mat-form-field appearance="outline" >
|
||||||
<mat-label>Default Root Folder</mat-label>
|
<mat-label>Default Root Folder</mat-label>
|
||||||
<mat-select formControlName="defaultRootPath" required>
|
<mat-select formControlName="defaultRootPath">
|
||||||
<mat-option *ngFor="let folder of rootFolders" [value]="folder.path">
|
<mat-option *ngFor="let folder of rootFolders" [value]="folder.path">
|
||||||
{{folder.path}}
|
{{folder.path}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
<div class="md-form-field">
|
<div class="md-form-field">
|
||||||
<mat-form-field appearance="outline" >
|
<mat-form-field appearance="outline" >
|
||||||
<mat-label>Default Minimum Availability</mat-label>
|
<mat-label>Default Minimum Availability</mat-label>
|
||||||
<mat-select formControlName="minimumAvailability" required>
|
<mat-select formControlName="minimumAvailability">
|
||||||
<mat-option *ngFor="let min of minimumAvailabilityOptions" [value]="min.value">
|
<mat-option *ngFor="let min of minimumAvailabilityOptions" [value]="min.value">
|
||||||
{{min.name}}
|
{{min.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { TesterService, NotificationService, RadarrService } from "../../../serv
|
||||||
selector: "ombi-settings-radarr-form",
|
selector: "ombi-settings-radarr-form",
|
||||||
templateUrl: "./radarr-form.component.html",
|
templateUrl: "./radarr-form.component.html",
|
||||||
styleUrls: ["./radarr-form.component.scss"],
|
styleUrls: ["./radarr-form.component.scss"],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
// changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
export class RadarrFormComponent implements OnInit {
|
export class RadarrFormComponent implements OnInit {
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ export class RadarrFormComponent implements OnInit {
|
||||||
|
|
||||||
public ngOnInit() {
|
public ngOnInit() {
|
||||||
this.form = <FormGroup>this.controlContainer.control;
|
this.form = <FormGroup>this.controlContainer.control;
|
||||||
|
// this.toggleValidators();
|
||||||
|
|
||||||
this.qualities = [];
|
this.qualities = [];
|
||||||
this.qualities.push({ name: "Please Select", id: -1 });
|
this.qualities.push({ name: "Please Select", id: -1 });
|
||||||
|
|
|
@ -31,8 +31,4 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<pre>
|
|
||||||
{{ form.value | json }}
|
|
||||||
</pre>
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { FormBuilder, FormGroup } from "@angular/forms";
|
import { FormBuilder, FormGroup, ValidationErrors } from "@angular/forms";
|
||||||
|
|
||||||
import { IMinimumAvailability, IRadarrCombined, IRadarrProfile, IRadarrRootFolder } from "../../interfaces";
|
import { IMinimumAvailability, IRadarrCombined, IRadarrProfile, IRadarrRootFolder } from "../../interfaces";
|
||||||
import { NotificationService, SettingsService } from "../../services";
|
import { NotificationService, SettingsService } from "../../services";
|
||||||
|
@ -63,11 +63,12 @@ export class RadarrComponent implements OnInit {
|
||||||
}
|
}
|
||||||
const radarrForm = form.controls.radarr as FormGroup;
|
const radarrForm = form.controls.radarr as FormGroup;
|
||||||
const radarr4KForm = form.controls.radarr4K as FormGroup;
|
const radarr4KForm = form.controls.radarr4K as FormGroup;
|
||||||
if (radarrForm.controls.enabled && (radarrForm.controls.defaultQualityProfile.value === "-1" || radarrForm.controls.defaultRootPath.value === "Please Select")) {
|
|
||||||
|
if (radarrForm.controls.enabled.value && (radarrForm.controls.defaultQualityProfile.value === -1 || radarrForm.controls.defaultRootPath.value === "Please Select")) {
|
||||||
this.notificationService.error("Please check your entered values for Radarr");
|
this.notificationService.error("Please check your entered values for Radarr");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (radarr4KForm.controls.enabled && (radarr4KForm.controls.defaultQualityProfile.value === "-1" || radarr4KForm.controls.defaultRootPath.value === "Please Select")) {
|
if (radarr4KForm.controls.enabled.value && (radarr4KForm.controls.defaultQualityProfile.value === -1 || radarr4KForm.controls.defaultRootPath.value === "Please Select")) {
|
||||||
this.notificationService.error("Please check your entered values for Radarr 4K");
|
this.notificationService.error("Please check your entered values for Radarr 4K");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,74 +82,6 @@ import { VoteComponent } from "./vote/vote.component";
|
||||||
import { WebhookComponent } from "./notifications/webhook.component";
|
import { WebhookComponent } from "./notifications/webhook.component";
|
||||||
import { WhatsAppComponent } from "./notifications/twilio/whatsapp.component";
|
import { WhatsAppComponent } from "./notifications/twilio/whatsapp.component";
|
||||||
import { WikiComponent } from "./wiki.component";
|
import { WikiComponent } from "./wiki.component";
|
||||||
|
|
||||||
// import { TagInputModule } from "ngx-chips";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: "Ombi", component: OmbiComponent, canActivate: [AuthGuard] },
|
{ path: "Ombi", component: OmbiComponent, canActivate: [AuthGuard] },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue