feat: Added 4k radarr to the settings page

radarr4k
tidusjar 3 years ago
parent 6c710e444f
commit 1c4db0ab69

@ -1,5 +1,5 @@
<div [formGroup]="form"> <div [formGroup]="form">
<div class="row"> <div class="row top-spacing">
<div class="col-md-12 col-12 col-sm-12"> <div class="col-md-12 col-12 col-sm-12">
<div > <div >
<div class="md-form-field"> <div class="md-form-field">

@ -14,4 +14,8 @@
.row { .row {
display: block; display: block;
}
.top-spacing {
margin-top: 10px;
} }

@ -1,12 +1,9 @@
import { ChangeDetectionStrategy, Component, OnInit } from "@angular/core"; import { ChangeDetectionStrategy, Component, OnInit } from "@angular/core";
import { ControlContainer, FormGroup, Validators } from "@angular/forms"; import { ControlContainer, FormGroup, Validators } from "@angular/forms";
import { IMinimumAvailability, IRadarrProfile, IRadarrRootFolder } from "../../../interfaces"; import { IMinimumAvailability, IRadarrProfile, IRadarrRootFolder, IRadarrSettings } from "../../../interfaces";
import { IRadarrSettings } from "../../../interfaces"; import { TesterService, NotificationService, RadarrService } from "../../../services";
import { RadarrService } from "../../../services";
import { TesterService } from "../../../services";
import { NotificationService } from "../../../services";
import { SettingsService } from "../../../services";
@Component({ @Component({
selector: "ombi-settings-radarr-form", selector: "ombi-settings-radarr-form",

@ -5,14 +5,30 @@
<div class="md-form-field" style="margin-top:1em;"></div> <div class="md-form-field" style="margin-top:1em;"></div>
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)"> <form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
<ombi-settings-radarr-form formGroupName="radarr"> <mat-tab-group dynamicHeight>
<mat-tab label="Radarr">
<ombi-settings-radarr-form
formGroupName="radarr">
</ombi-settings-radarr-form>
</mat-tab>
<mat-tab label="Radarr 4K">
<ombi-settings-radarr-form
formGroupName="radarr4K">
</ombi-settings-radarr-form>
</mat-tab>
</mat-tab-group>
</ombi-settings-radarr-form>
<div class="md-form-field" style="margin-top:1em;">
<button mat-raised-button type="submit" color="primary" [disabled]="form.invalid" class="mat-focus-indicator mat-stroked-button accent mat-accent mat-raised-button mat-button-base" ng-reflect-disabled="false"><span class="mat-button-wrapper">Submit</span><div matripple="" class="mat-ripple mat-button-ripple" ng-reflect-disabled="false" ng-reflect-centered="false" ng-reflect-trigger="[object HTMLButtonElement]"></div><div class="mat-button-focus-overlay"></div></button> <div class="md-form-field" style="margin-top:1em;">
</div> <button mat-raised-button type="submit" color="primary" [disabled]="form.invalid"
class="mat-focus-indicator mat-stroked-button accent mat-accent mat-raised-button mat-button-base"
ng-reflect-disabled="false"><span class="mat-button-wrapper">Submit</span>
<div matripple="" class="mat-ripple mat-button-ripple" ng-reflect-disabled="false"
ng-reflect-centered="false" ng-reflect-trigger="[object HTMLButtonElement]"></div>
<div class="mat-button-focus-overlay"></div>
</button>
</div>
</form> </form>
</fieldset> </fieldset>
</div> </div>

@ -1,12 +1,8 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { FormBuilder, FormGroup } from "@angular/forms";
import { IMinimumAvailability, IRadarrCombined, IRadarrProfile, IRadarrRootFolder } from "../../interfaces"; import { IMinimumAvailability, IRadarrCombined, IRadarrProfile, IRadarrRootFolder } from "../../interfaces";
import { IRadarrSettings } from "../../interfaces"; import { NotificationService, SettingsService } from "../../services";
import { RadarrService } from "../../services";
import { TesterService } from "../../services";
import { NotificationService } from "../../services";
import { SettingsService } from "../../services";
@Component({ @Component({
templateUrl: "./radarr.component.html", templateUrl: "./radarr.component.html",
@ -22,10 +18,8 @@ export class RadarrComponent implements OnInit {
public form: FormGroup; public form: FormGroup;
constructor(private settingsService: SettingsService, constructor(private settingsService: SettingsService,
private radarrService: RadarrService,
private notificationService: NotificationService, private notificationService: NotificationService,
private fb: FormBuilder, private fb: FormBuilder) { }
private testerService: TesterService) { }
public ngOnInit() { public ngOnInit() {
this.settingsService.getRadarr() this.settingsService.getRadarr()
@ -45,17 +39,17 @@ export class RadarrComponent implements OnInit {
scanForAvailability: [x.radarr.scanForAvailability] scanForAvailability: [x.radarr.scanForAvailability]
}), }),
radarr4K: this.fb.group({ radarr4K: this.fb.group({
enabled: [x.radarr.enabled], enabled: [x.radarr4K.enabled],
apiKey: [x.radarr.apiKey], apiKey: [x.radarr4K.apiKey],
defaultQualityProfile: [+x.radarr.defaultQualityProfile], defaultQualityProfile: [+x.radarr4K.defaultQualityProfile],
defaultRootPath: [x.radarr.defaultRootPath], defaultRootPath: [x.radarr4K.defaultRootPath],
ssl: [x.radarr.ssl], ssl: [x.radarr4K.ssl],
subDir: [x.radarr.subDir], subDir: [x.radarr4K.subDir],
ip: [x.radarr.ip], ip: [x.radarr4K.ip],
port: [x.radarr.port], port: [x.radarr4K.port],
addOnly: [x.radarr.addOnly], addOnly: [x.radarr4K.addOnly],
minimumAvailability: [x.radarr.minimumAvailability], minimumAvailability: [x.radarr4K.minimumAvailability],
scanForAvailability: [x.radarr.scanForAvailability] scanForAvailability: [x.radarr4K.scanForAvailability]
}), }),
}); });
}); });

Loading…
Cancel
Save