Commit 942cadfc7395d7aa8419f4948b7c20547aa7c03b

Authored by ArtemDzhereleiko
1 parent 06708c47

Fix whitespeces and translation

... ... @@ -86,12 +86,12 @@
86 86 </div>
87 87 <div fxLayout="row" fxLayoutAlign=" center" style="padding-bottom: 16px;">
88 88 <button mat-raised-button ngxClipboard
89   - (cbOnSuccess)="onTokenCopied($event)"
90   - [cbContent]="token">
  89 + (cbOnSuccess)="onTokenCopied()"
  90 + [cbContent]="jwtToken">
91 91 <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
92 92 <span>{{ 'profile.copy-jwt-token' | translate }}</span>
93 93 </button>
94   - <span style="padding: 10px; opacity: 0.7;">{{getExpirationDate}}</span>
  94 + <span class="profile-btn-subtext">{{ expirationJwtData }}</span>
95 95 </div>
96 96 <div fxLayout="row" class="layout-wrap">
97 97 <span fxFlex></span>
... ...
... ... @@ -38,6 +38,10 @@
38 38 font-size: 16px;
39 39 font-weight: 400;
40 40 }
  41 + .profile-btn-subtext {
  42 + opacity: 0.7;
  43 + padding: 10px;
  44 + }
41 45 .tb-home-dashboard {
42 46 tb-dashboard-autocomplete {
43 47 @media #{$mat-gt-sm} {
... ...
... ... @@ -34,7 +34,7 @@ import { AuthService } from '@core/auth/auth.service';
34 34 import { ActivatedRoute } from '@angular/router';
35 35 import { isDefinedAndNotNull } from '@core/utils';
36 36 import { getCurrentAuthUser } from '@core/auth/auth.selectors';
37   -import {ActionNotificationShow} from "@core/notification/notification.actions";
  37 +import { ActionNotificationShow } from '@core/notification/notification.actions';
38 38 import { DatePipe } from '@angular/common';
39 39
40 40 @Component({
... ... @@ -50,14 +50,14 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir
50 50 languageList = env.supportedLangs;
51 51 private readonly authUser: AuthUser;
52 52
53   - get token() {
  53 + get jwtToken(): string {
54 54 return `Bearer ${localStorage.getItem('jwt_token')}`;
55 55 }
56 56
57   - get getExpirationDate() {
  57 + get expirationJwtData(): string {
58 58 const expirationData = this.datePipe.transform(localStorage.getItem('jwt_token_expiration'), 'yyyy-MM-dd HH:mm:ss');
59   - return this.translate.instant('profile.valid-till', {expirationData});
60   - };
  59 + return this.translate.instant('profile.valid-till', { expirationData });
  60 + }
61 61
62 62 constructor(protected store: Store<AppState>,
63 63 private route: ActivatedRoute,
... ... @@ -153,7 +153,7 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir
153 153 return this.authUser.authority === Authority.SYS_ADMIN;
154 154 }
155 155
156   - onTokenCopied($event) {
  156 + onTokenCopied() {
157 157 this.store.dispatch(new ActionNotificationShow({
158 158 message: this.translate.instant('profile.tokenCopiedMessage'),
159 159 type: 'success',
... ...
... ... @@ -1264,7 +1264,7 @@
1264 1264 "change-password": "Изменить пароль",
1265 1265 "current-password": "Текущий пароль",
1266 1266 "copy-jwt-token": "Копировать JWT токен",
1267   - "valid-till": "Годен до {{expirationData}}",
  1267 + "valid-till": "Действителен до {{expirationData}}",
1268 1268 "tokenCopiedMessage": "JWT токен скопирован в буфер обмена"
1269 1269 },
1270 1270 "relation": {
... ...
... ... @@ -1679,7 +1679,7 @@
1679 1679 "change-password": "Змінити пароль",
1680 1680 "current-password": "Поточний пароль",
1681 1681 "copy-jwt-token": "Копіювати JWT токен",
1682   - "valid-till": "Придатний до {{expirationData}}",
  1682 + "valid-till": "Дійсний до {{expirationData}}",
1683 1683 "tokenCopiedMessage": "JWT токен скопійовано в буфер обміну"
1684 1684 },
1685 1685 "relation": {
... ...