diff --git a/src/Ombi.Settings/Settings/Models/CustomPageSettings.cs b/src/Ombi.Settings/Settings/Models/CustomPageSettings.cs
index 0087bbe02..18c0125cb 100644
--- a/src/Ombi.Settings/Settings/Models/CustomPageSettings.cs
+++ b/src/Ombi.Settings/Settings/Models/CustomPageSettings.cs
@@ -4,5 +4,6 @@
{
public string Title { get; set; }
public string Html { get; set; }
+ public string FontAwesomeIcon { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Ombi/ClientApp/app/app.component.html b/src/Ombi/ClientApp/app/app.component.html
index 9f6d00a7e..08c153f31 100644
--- a/src/Ombi/ClientApp/app/app.component.html
+++ b/src/Ombi/ClientApp/app/app.component.html
@@ -34,6 +34,14 @@
{{ 'NavigationBar.Requests' | translate }}
+
-
diff --git a/src/Ombi/ClientApp/app/app.component.ts b/src/Ombi/ClientApp/app/app.component.ts
index 26f88c8f8..d865e6604 100644
--- a/src/Ombi/ClientApp/app/app.component.ts
+++ b/src/Ombi/ClientApp/app/app.component.ts
@@ -7,7 +7,7 @@ import { ILocalUser } from "./auth/IUserLogin";
import { IdentityService, NotificationService } from "./services";
import { JobService, SettingsService } from "./services";
-import { ICustomizationSettings } from "./interfaces";
+import { ICustomizationSettings, ICustomPage } from "./interfaces";
@Component({
selector: "ombi",
@@ -17,6 +17,7 @@ import { ICustomizationSettings } from "./interfaces";
export class AppComponent implements OnInit {
public customizationSettings: ICustomizationSettings;
+ public customPageSettings: ICustomPage;
public issuesEnabled = false;
public user: ILocalUser;
public showNav: boolean;
@@ -53,7 +54,18 @@ export class AppComponent implements OnInit {
public ngOnInit() {
this.user = this.authService.claims();
- this.settingsService.getCustomization().subscribe(x => this.customizationSettings = x);
+ this.settingsService.getCustomization().subscribe(x => {
+ this.customizationSettings = x;
+ if(this.customizationSettings.useCustomPage) {
+ this.settingsService.getCustomPage().subscribe(c => {
+ this.customPageSettings = c;
+ if(!this.customPageSettings.title) {
+ this.customPageSettings.title = "Custom Page";
+ this.customPageSettings.fontAwesomeIcon = "fa-check";
+ }
+ });
+ }
+ });
this.settingsService.issueEnabled().subscribe(x => this.issuesEnabled = x);
this.settingsService.voteEnabled().subscribe(x => this.voteEnabled =x);
diff --git a/src/Ombi/ClientApp/app/custompage/custompage.component.html b/src/Ombi/ClientApp/app/custompage/custompage.component.html
index 3188f5d4e..826bc673f 100644
--- a/src/Ombi/ClientApp/app/custompage/custompage.component.html
+++ b/src/Ombi/ClientApp/app/custompage/custompage.component.html
@@ -11,6 +11,15 @@
+
+
+
+
+
+
diff --git a/src/Ombi/ClientApp/app/custompage/custompage.component.scss b/src/Ombi/ClientApp/app/custompage/custompage.component.scss
index 127ee8b74..702973737 100644
--- a/src/Ombi/ClientApp/app/custompage/custompage.component.scss
+++ b/src/Ombi/ClientApp/app/custompage/custompage.component.scss
@@ -41,4 +41,4 @@ $bg-colour-disabled: #252424;
:host app-ngx-editor /deep/ .ngx-editor-message {
display:none !important;
-}
\ No newline at end of file
+}
diff --git a/src/Ombi/ClientApp/app/custompage/custompage.component.ts b/src/Ombi/ClientApp/app/custompage/custompage.component.ts
index e5968cc6e..f346bef2b 100644
--- a/src/Ombi/ClientApp/app/custompage/custompage.component.ts
+++ b/src/Ombi/ClientApp/app/custompage/custompage.component.ts
@@ -1,5 +1,6 @@
-import { Component, OnInit } from "@angular/core";
+import { Component, OnInit, SecurityContext } from "@angular/core";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
+import { DomSanitizer } from "@angular/platform-browser";
import { AuthService } from "../auth/auth.service";
import { NotificationService, SettingsService } from "../services";
@@ -14,16 +15,18 @@ export class CustomPageComponent implements OnInit {
public isAdmin: boolean;
constructor(private auth: AuthService, private settings: SettingsService, private fb: FormBuilder,
- private notificationService: NotificationService) {
+ private notificationService: NotificationService,
+ private sanitizer: DomSanitizer) {
}
public ngOnInit() {
this.settings.getCustomPage().subscribe(x => {
-
+ x.html = this.sanitizer.sanitize(SecurityContext.HTML, this.sanitizer.bypassSecurityTrustHtml(x.html));
this.form = this.fb.group({
enabled: [x.enabled],
title: [x.title, [Validators.required]],
html: [x.html, [Validators.required]],
+ fontAwesomeIcon: [x.fontAwesomeIcon, [Validators.required]],
});
});
this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser");
diff --git a/src/Ombi/ClientApp/app/interfaces/ISettings.ts b/src/Ombi/ClientApp/app/interfaces/ISettings.ts
index 18a509bb2..2f8a4e80b 100644
--- a/src/Ombi/ClientApp/app/interfaces/ISettings.ts
+++ b/src/Ombi/ClientApp/app/interfaces/ISettings.ts
@@ -161,8 +161,9 @@ export interface IAuthenticationSettings extends ISettings {
export interface ICustomPage extends ISettings {
enabled: boolean;
+ fontAwesomeIcon: string;
title: string;
- html: string;
+ html: any;
}
export interface IUserManagementSettings extends ISettings {
diff --git a/src/Ombi/ClientApp/app/settings/customization/customization.component.html b/src/Ombi/ClientApp/app/settings/customization/customization.component.html
index 90c6fb5bc..21a992c32 100644
--- a/src/Ombi/ClientApp/app/settings/customization/customization.component.html
+++ b/src/Ombi/ClientApp/app/settings/customization/customization.component.html
@@ -21,8 +21,8 @@
@@ -36,8 +36,8 @@
diff --git a/src/Ombi/Ombi.csproj b/src/Ombi/Ombi.csproj
index 881a6cc54..dc447dd20 100644
--- a/src/Ombi/Ombi.csproj
+++ b/src/Ombi/Ombi.csproj
@@ -14,12 +14,12 @@
false
- bin\Debug\netcoreapp2.0\Swagger.xml
+ bin\Debug\netcoreapp2.2\Swagger.xml
1701;1702;1705;1591;
- bin\Release\netcoreapp2.0\Swagger.xml
+ bin\Release\netcoreapp2.2\Swagger.xml
1701;1702;1705;1591;
TRACE;RELEASE;NETCOREAPP2_0
@@ -71,7 +71,7 @@
-
+