From 1c6c7d1a9d98dd1904ee6fe766276cdc1aa1ab28 Mon Sep 17 00:00:00 2001 From: Denys Ivashchenko Date: Wed, 10 Nov 2021 10:50:20 +0200 Subject: [PATCH 1/2] added localization to password & email --- .../personal-cabinet/user-config/user-config.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/shell/personal-cabinet/user-config/user-config.component.ts b/src/app/shell/personal-cabinet/user-config/user-config.component.ts index 842508185e..0e88a7f5ef 100644 --- a/src/app/shell/personal-cabinet/user-config/user-config.component.ts +++ b/src/app/shell/personal-cabinet/user-config/user-config.component.ts @@ -11,6 +11,7 @@ import { environment } from 'src/environments/environment'; styleUrls: ['./user-config.component.scss'] }) export class UserConfigComponent implements OnInit { + public culture: string; @Select(RegistrationState.user) user$: Observable; @@ -20,10 +21,10 @@ export class UserConfigComponent implements OnInit { constructor() { } ngOnInit(): void { - + this.culture = localStorage.getItem('ui-culture'); } onRedirect(link: string): void { - window.open(this.authServer + link, link, 'height=500,width=500'); + window.open(`${this.authServer + link}?culture=${this.culture}&ui-culture=${this.culture}`, link, 'height=500,width=500'); } } From ac24bdbe3de9b99e48834111dc250472fd4abe69 Mon Sep 17 00:00:00 2001 From: Denys Ivashchenko Date: Wed, 10 Nov 2021 11:30:25 +0200 Subject: [PATCH 2/2] fixed coment --- .../user-config/user-config.component.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/shell/personal-cabinet/user-config/user-config.component.ts b/src/app/shell/personal-cabinet/user-config/user-config.component.ts index 0e88a7f5ef..735677c20f 100644 --- a/src/app/shell/personal-cabinet/user-config/user-config.component.ts +++ b/src/app/shell/personal-cabinet/user-config/user-config.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; import { Select } from '@ngxs/store'; import { Observable } from 'rxjs'; import { User } from 'src/app/shared/models/user.model'; @@ -10,8 +10,8 @@ import { environment } from 'src/environments/environment'; templateUrl: './user-config.component.html', styleUrls: ['./user-config.component.scss'] }) -export class UserConfigComponent implements OnInit { - public culture: string; +export class UserConfigComponent { + public culture: string = localStorage.getItem('ui-culture');; @Select(RegistrationState.user) user$: Observable; @@ -20,10 +20,6 @@ export class UserConfigComponent implements OnInit { constructor() { } - ngOnInit(): void { - this.culture = localStorage.getItem('ui-culture'); - } - onRedirect(link: string): void { window.open(`${this.authServer + link}?culture=${this.culture}&ui-culture=${this.culture}`, link, 'height=500,width=500'); }