mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Fixed #2756
This commit is contained in:
parent
65ea88925a
commit
3bf07c63f9
2 changed files with 4 additions and 11 deletions
|
@ -4,7 +4,7 @@ import { NavigationStart, Router } from "@angular/router";
|
||||||
import { TranslateService } from "@ngx-translate/core";
|
import { TranslateService } from "@ngx-translate/core";
|
||||||
import { AuthService } from "./auth/auth.service";
|
import { AuthService } from "./auth/auth.service";
|
||||||
import { ILocalUser } from "./auth/IUserLogin";
|
import { ILocalUser } from "./auth/IUserLogin";
|
||||||
import { IdentityService, NotificationService } from "./services";
|
import { CustomPageService, IdentityService, NotificationService } from "./services";
|
||||||
import { JobService, SettingsService } from "./services";
|
import { JobService, SettingsService } from "./services";
|
||||||
|
|
||||||
import { ICustomizationSettings, ICustomPage } from "./interfaces";
|
import { ICustomizationSettings, ICustomPage } from "./interfaces";
|
||||||
|
@ -35,7 +35,8 @@ export class AppComponent implements OnInit {
|
||||||
private readonly jobService: JobService,
|
private readonly jobService: JobService,
|
||||||
public readonly translate: TranslateService,
|
public readonly translate: TranslateService,
|
||||||
private readonly identityService: IdentityService,
|
private readonly identityService: IdentityService,
|
||||||
private readonly platformLocation: PlatformLocation) {
|
private readonly platformLocation: PlatformLocation,
|
||||||
|
private readonly customPageService: CustomPageService) {
|
||||||
|
|
||||||
const base = this.platformLocation.getBaseHrefFromDOM();
|
const base = this.platformLocation.getBaseHrefFromDOM();
|
||||||
if (base.length > 1) {
|
if (base.length > 1) {
|
||||||
|
@ -57,7 +58,7 @@ export class AppComponent implements OnInit {
|
||||||
this.settingsService.getCustomization().subscribe(x => {
|
this.settingsService.getCustomization().subscribe(x => {
|
||||||
this.customizationSettings = x;
|
this.customizationSettings = x;
|
||||||
if(this.customizationSettings.useCustomPage) {
|
if(this.customizationSettings.useCustomPage) {
|
||||||
this.settingsService.getCustomPage().subscribe(c => {
|
this.customPageService.getCustomPage().subscribe(c => {
|
||||||
this.customPageSettings = c;
|
this.customPageSettings = c;
|
||||||
if(!this.customPageSettings.title) {
|
if(!this.customPageSettings.title) {
|
||||||
this.customPageSettings.title = "Custom Page";
|
this.customPageSettings.title = "Custom Page";
|
||||||
|
|
|
@ -113,14 +113,6 @@ export class SettingsService extends ServiceHelpers {
|
||||||
return this.http.get<IAuthenticationSettings>(`${this.url}/Authentication`, {headers: this.headers});
|
return this.http.get<IAuthenticationSettings>(`${this.url}/Authentication`, {headers: this.headers});
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCustomPage(): Observable<ICustomPage> {
|
|
||||||
return this.http.get<ICustomPage>(`${this.url}/CustomPage`, {headers: this.headers});
|
|
||||||
}
|
|
||||||
|
|
||||||
public saveCustomPage(model: ICustomPage): Observable<boolean> {
|
|
||||||
return this.http.post<boolean>(`${this.url}/CustomPage`, model, {headers: this.headers});
|
|
||||||
}
|
|
||||||
|
|
||||||
public getClientId(): Observable<string> {
|
public getClientId(): Observable<string> {
|
||||||
return this.http.get<string>(`${this.url}/clientid`, {headers: this.headers});
|
return this.http.get<string>(`${this.url}/clientid`, {headers: this.headers});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue