Fix whitespeces and translation
This commit is contained in:
parent
06708c4746
commit
942cadfc73
@ -86,12 +86,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign=" center" style="padding-bottom: 16px;">
|
<div fxLayout="row" fxLayoutAlign=" center" style="padding-bottom: 16px;">
|
||||||
<button mat-raised-button ngxClipboard
|
<button mat-raised-button ngxClipboard
|
||||||
(cbOnSuccess)="onTokenCopied($event)"
|
(cbOnSuccess)="onTokenCopied()"
|
||||||
[cbContent]="token">
|
[cbContent]="jwtToken">
|
||||||
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
|
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
|
||||||
<span>{{ 'profile.copy-jwt-token' | translate }}</span>
|
<span>{{ 'profile.copy-jwt-token' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<span style="padding: 10px; opacity: 0.7;">{{getExpirationDate}}</span>
|
<span class="profile-btn-subtext">{{ expirationJwtData }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" class="layout-wrap">
|
<div fxLayout="row" class="layout-wrap">
|
||||||
<span fxFlex></span>
|
<span fxFlex></span>
|
||||||
|
|||||||
@ -38,6 +38,10 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
.profile-btn-subtext {
|
||||||
|
opacity: 0.7;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
.tb-home-dashboard {
|
.tb-home-dashboard {
|
||||||
tb-dashboard-autocomplete {
|
tb-dashboard-autocomplete {
|
||||||
@media #{$mat-gt-sm} {
|
@media #{$mat-gt-sm} {
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import { AuthService } from '@core/auth/auth.service';
|
|||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { isDefinedAndNotNull } from '@core/utils';
|
import { isDefinedAndNotNull } from '@core/utils';
|
||||||
import { getCurrentAuthUser } from '@core/auth/auth.selectors';
|
import { getCurrentAuthUser } from '@core/auth/auth.selectors';
|
||||||
import {ActionNotificationShow} from "@core/notification/notification.actions";
|
import { ActionNotificationShow } from '@core/notification/notification.actions';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -50,14 +50,14 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir
|
|||||||
languageList = env.supportedLangs;
|
languageList = env.supportedLangs;
|
||||||
private readonly authUser: AuthUser;
|
private readonly authUser: AuthUser;
|
||||||
|
|
||||||
get token() {
|
get jwtToken(): string {
|
||||||
return `Bearer ${localStorage.getItem('jwt_token')}`;
|
return `Bearer ${localStorage.getItem('jwt_token')}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
get getExpirationDate() {
|
get expirationJwtData(): string {
|
||||||
const expirationData = this.datePipe.transform(localStorage.getItem('jwt_token_expiration'), 'yyyy-MM-dd HH:mm:ss');
|
const expirationData = this.datePipe.transform(localStorage.getItem('jwt_token_expiration'), 'yyyy-MM-dd HH:mm:ss');
|
||||||
return this.translate.instant('profile.valid-till', { expirationData });
|
return this.translate.instant('profile.valid-till', { expirationData });
|
||||||
};
|
}
|
||||||
|
|
||||||
constructor(protected store: Store<AppState>,
|
constructor(protected store: Store<AppState>,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@ -153,7 +153,7 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir
|
|||||||
return this.authUser.authority === Authority.SYS_ADMIN;
|
return this.authUser.authority === Authority.SYS_ADMIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
onTokenCopied($event) {
|
onTokenCopied() {
|
||||||
this.store.dispatch(new ActionNotificationShow({
|
this.store.dispatch(new ActionNotificationShow({
|
||||||
message: this.translate.instant('profile.tokenCopiedMessage'),
|
message: this.translate.instant('profile.tokenCopiedMessage'),
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
@ -1264,7 +1264,7 @@
|
|||||||
"change-password": "Изменить пароль",
|
"change-password": "Изменить пароль",
|
||||||
"current-password": "Текущий пароль",
|
"current-password": "Текущий пароль",
|
||||||
"copy-jwt-token": "Копировать JWT токен",
|
"copy-jwt-token": "Копировать JWT токен",
|
||||||
"valid-till": "Годен до {{expirationData}}",
|
"valid-till": "Действителен до {{expirationData}}",
|
||||||
"tokenCopiedMessage": "JWT токен скопирован в буфер обмена"
|
"tokenCopiedMessage": "JWT токен скопирован в буфер обмена"
|
||||||
},
|
},
|
||||||
"relation": {
|
"relation": {
|
||||||
|
|||||||
@ -1679,7 +1679,7 @@
|
|||||||
"change-password": "Змінити пароль",
|
"change-password": "Змінити пароль",
|
||||||
"current-password": "Поточний пароль",
|
"current-password": "Поточний пароль",
|
||||||
"copy-jwt-token": "Копіювати JWT токен",
|
"copy-jwt-token": "Копіювати JWT токен",
|
||||||
"valid-till": "Придатний до {{expirationData}}",
|
"valid-till": "Дійсний до {{expirationData}}",
|
||||||
"tokenCopiedMessage": "JWT токен скопійовано в буфер обміну"
|
"tokenCopiedMessage": "JWT токен скопійовано в буфер обміну"
|
||||||
},
|
},
|
||||||
"relation": {
|
"relation": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user