This commit is contained in:
tidusjar 2021-05-16 12:05:59 +01:00
commit 7f74294ae3
2 changed files with 9 additions and 3 deletions

View file

@ -63,7 +63,7 @@
<div class="col-12"> <div class="col-12">
<a href='https://apps.apple.com/us/app/ombi/id1335260043' target="_blank"><img <a href='https://apps.apple.com/us/app/ombi/id1335260043' target="_blank"><img
style="margin-left:13px" width="170px" alt='Get it from the App Store' style="margin-left:13px" width="170px" alt='Get it from the App Store'
src='../../../images/appstore.svg' /></a> src='{{baseUrl}}/images/appstore.svg' /></a>
</div> </div>
<div class="col-12"> <div class="col-12">
<button style="margin-left:13px; margin-top: 20px;" mat-raised-button color="accent" type="button" (click)="openMobileApp($event)">Open Mobile App</button> <button style="margin-left:13px; margin-top: 20px;" mat-raised-button color="accent" type="button" (click)="openMobileApp($event)">Open Mobile App</button>

View file

@ -1,4 +1,4 @@
import { Component, OnInit } from "@angular/core"; import { Component, Inject, OnInit } from "@angular/core";
import { AuthService } from "../../../auth/auth.service"; import { AuthService } from "../../../auth/auth.service";
import { TranslateService } from "@ngx-translate/core"; import { TranslateService } from "@ngx-translate/core";
import { AvailableLanguages, ILanguage } from "./user-preference.constants"; import { AvailableLanguages, ILanguage } from "./user-preference.constants";
@ -6,6 +6,7 @@ import { IdentityService, NotificationService, SettingsService, ValidationServic
import { ICustomizationSettings, IUser, UserType } from "../../../interfaces"; import { ICustomizationSettings, IUser, UserType } from "../../../interfaces";
import { Md5 } from "ts-md5"; import { Md5 } from "ts-md5";
import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { APP_BASE_HREF } from "@angular/common";
@Component({ @Component({
templateUrl: "./user-preference.component.html", templateUrl: "./user-preference.component.html",
@ -22,6 +23,7 @@ export class UserPreferenceComponent implements OnInit {
public selectedCountry: string; public selectedCountry: string;
public customizationSettings: ICustomizationSettings; public customizationSettings: ICustomizationSettings;
public UserType = UserType; public UserType = UserType;
public baseUrl: string;
public passwordForm: FormGroup; public passwordForm: FormGroup;
@ -33,9 +35,13 @@ export class UserPreferenceComponent implements OnInit {
private readonly identityService: IdentityService, private readonly identityService: IdentityService,
private readonly settingsService: SettingsService, private readonly settingsService: SettingsService,
private readonly fb: FormBuilder, private readonly fb: FormBuilder,
private readonly validationService: ValidationService) { } private readonly validationService: ValidationService,
@Inject(APP_BASE_HREF) public internalBaseUrl: string) { }
public async ngOnInit() { public async ngOnInit() {
if (this.internalBaseUrl.length > 1) {
this.baseUrl = this.internalBaseUrl;
}
const user = this.authService.claims(); const user = this.authService.claims();
if (user.name) { if (user.name) {
this.username = user.name; this.username = user.name;