From 7f74294ae316d8c5bd5a576d53a61e18b4208c54 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sun, 16 May 2021 12:05:59 +0100 Subject: [PATCH] Fixed #4190 --- .../user-preference/user-preference.component.html | 2 +- .../user-preference/user-preference.component.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html index 6954030de..0f3dbb082 100644 --- a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html +++ b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.html @@ -63,7 +63,7 @@
Get it from the App Store + src='{{baseUrl}}/images/appstore.svg' />
diff --git a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts index eb504065c..b4cfa6709 100644 --- a/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts +++ b/src/Ombi/ClientApp/src/app/user-preferences/components/user-preference/user-preference.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from "@angular/core"; +import { Component, Inject, OnInit } from "@angular/core"; import { AuthService } from "../../../auth/auth.service"; import { TranslateService } from "@ngx-translate/core"; import { AvailableLanguages, ILanguage } from "./user-preference.constants"; @@ -6,6 +6,7 @@ import { IdentityService, NotificationService, SettingsService, ValidationServic import { ICustomizationSettings, IUser, UserType } from "../../../interfaces"; import { Md5 } from "ts-md5"; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; +import { APP_BASE_HREF } from "@angular/common"; @Component({ templateUrl: "./user-preference.component.html", @@ -22,6 +23,7 @@ export class UserPreferenceComponent implements OnInit { public selectedCountry: string; public customizationSettings: ICustomizationSettings; public UserType = UserType; + public baseUrl: string; public passwordForm: FormGroup; @@ -33,9 +35,13 @@ export class UserPreferenceComponent implements OnInit { private readonly identityService: IdentityService, private readonly settingsService: SettingsService, private readonly fb: FormBuilder, - private readonly validationService: ValidationService) { } + private readonly validationService: ValidationService, + @Inject(APP_BASE_HREF) public internalBaseUrl: string) { } public async ngOnInit() { + if (this.internalBaseUrl.length > 1) { + this.baseUrl = this.internalBaseUrl; + } const user = this.authService.claims(); if (user.name) { this.username = user.name;