[AAE-15316] - Refactored UserInfoComponent to get typography from theme (#8937)

* [AAE-15316] - Refactored UserInfoComponent to get typography from theme

* AAE-15316: Code improvements
This commit is contained in:
Ehsan Rezaei
2023-10-02 16:29:32 +02:00
committed by GitHub
parent c2d45e10f8
commit e21ad3ca02
6 changed files with 28 additions and 150 deletions

View File

@@ -55,22 +55,21 @@
[outerHTML]="ecmUser | usernameInitials:'adf-userinfo-profile-initials adf-hide-small'"></div>
</ng-template>
<div class="adf-userinfo-title" id="ecm-username">{{ecmUser | fullName}}</div>
<div class="mat-title" id="ecm-username">{{ecmUser | fullName}}</div>
</mat-card-header>
<mat-card-content>
<div class="adf-userinfo-supporting-text">
<div class="adf-userinfo-detail">
<span id="ecm-full-name"
class="adf-userinfo__detail-title">{{ecmUser | fullName}}</span>
<span class="adf-userinfo__detail-profile" id="ecm-email"> {{ecmUser.email}} </span>
<a class="adf-userinfo__detail-profile" href="#/profile">
<h2 id="ecm-full-name"
class="adf-userinfo__detail-title">{{ecmUser | fullName}}</h2>
<span id="ecm-email"> {{ecmUser.email}} </span>
<a href="#/profile">
{{ 'USER_PROFILE.LABELS.MY_PROFILE' | translate }}</a>
</div>
<div class="adf-userinfo-detail">
<span class="adf-userinfo__secondary-info" id="ecm-job-title-label">
{{ 'USER_PROFILE.LABELS.ECM.JOB_TITLE' | translate }}
<span id="ecm-job-title"
class="adf-userinfo__detail-profile"> {{ ecmUser.jobTitle ? ecmUser.jobTitle : 'N/A' }} </span>
<span id="ecm-job-title"> {{ ecmUser.jobTitle ? ecmUser.jobTitle : 'N/A' }} </span>
</span>
</div>
</div>
@@ -90,16 +89,15 @@
<div
[outerHTML]="identityUser | usernameInitials:'adf-userinfo-profile-initials adf-hide-small'"></div>
</ng-template>
<div class="adf-userinfo-title" id="identity-username">{{identityUser | fullName}}</div>
<div class="mat-title" id="identity-username">{{identityUser | fullName}}</div>
</mat-card-header>
<mat-card-content>
<div class="adf-userinfo-supporting-text">
<div class="adf-userinfo-detail">
<span id="identity-full-name"
class="adf-userinfo__detail-title">{{identityUser | fullName}}</span>
<span class="adf-userinfo__detail-profile"
id="identity-email"> {{identityUser.email}} </span>
<a class="adf-userinfo__detail-profile" href="#/profile">
<h2 id="identity-full-name"
class="adf-userinfo__detail-title">{{identityUser | fullName}}</h2>
<span id="identity-email"> {{identityUser.email}} </span>
<a href="#/profile">
{{ 'USER_PROFILE.LABELS.MY_PROFILE' | translate }}</a>
</div>
</div>

View File

@@ -84,10 +84,6 @@
}
&-userinfo-supporting-text {
font-size: var(--theme-body-1-font-size);
font-weight: 400;
letter-spacing: 0;
line-height: 18px;
overflow: hidden;
padding: 32px;
column-count: 2;
@@ -99,28 +95,8 @@
}
}
&-userinfo-title {
font-size: var(--theme-title-font-size);
}
&-userinfo__detail-profile {
align-items: flex-start;
font-size: var(--theme-body-1-font-size);
font-weight: 400;
letter-spacing: 0;
line-height: 18px;
display: block;
padding: 0;
margin: 0;
}
&-userinfo__detail-title {
text-overflow: ellipsis;
font-size: var(--theme-subheading-2-font-size);
font-weight: 400;
letter-spacing: 0.04em;
line-height: 20px;
align-items: flex-start;
}
&-userinfo__secondary-info {