Skip to content

Commit

Permalink
always display verified email domain section in my-orcid (#2333)
Browse files Browse the repository at this point in the history
Co-authored-by: Angel Montenegro <[email protected]>
  • Loading branch information
auumgn and amontenegro authored Aug 28, 2024
1 parent bba9529 commit bfeb0e9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/app/cdk/panel/panel-element/panel-element.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div [ngClass]="{ 'row-with-privacy': hideVisibility }">
<div class="line" [ngClass]="{ bold: bold }"><ng-content></ng-content></div>
<div class="line" [ngClass]="{ bold: bold, italic: italic }">
<ng-content></ng-content>
</div>
<app-panel-privacy
*ngIf="visibility && hideVisibility"
[visibility]="visibility"
Expand Down
4 changes: 4 additions & 0 deletions src/app/cdk/panel/panel-element/panel-element.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ app-panel-privacy {
font-weight: bold;
}

.italic {
font-style: italic;
}

hr {
margin: 8px 0 8px 0;
height: 1px;
Expand Down
1 change: 1 addition & 0 deletions src/app/cdk/panel/panel-element/panel-element.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { VisibilityStrings } from 'src/app/types/common.endpoint'
export class PanelElementComponent implements OnInit {
@Input() visibility: VisibilityStrings | ''
@Input() bold: Boolean
@Input() italic: Boolean
@Input() hideVisibility: Boolean = true
@Input() isPublicRecord: string
@Input() separator: Boolean = false
Expand Down
14 changes: 8 additions & 6 deletions src/app/cdk/side-bar/side-bar/side-bar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
Emails & domains
</h3>
<app-panel-data
class="email-section"
*ngIf="
userRecord?.emails?.emails?.length > 0 &&
!isPublicRecord &&
Expand All @@ -152,12 +153,7 @@ <h4 header i18n="@@side-bar.emailAddresses">Email addresses</h4>
</app-panel-element>
</app-panel-data>
<app-panel-data
*ngIf="
userRecord?.emails?.emailDomains?.length > 0 &&
!isPublicRecord &&
emailDomainsTogglz &&
!loadingTogglz
"
*ngIf="!isPublicRecord && emailDomainsTogglz && !loadingTogglz"
>
<h4 header i18n="@@side-bar.verifiedEmailDomains">
Verified email domains
Expand All @@ -171,6 +167,12 @@ <h4 header i18n="@@side-bar.verifiedEmailDomains">
[separator]="!last"
>{{ emailDomain.value }}
</app-panel-element>
<app-panel-element
[italic]="true"
*ngIf="!userRecord?.emails?.emailDomains?.length"
i18n="@@side-bar.noVerifiedEmailDomains"
>No verified email domains</app-panel-element
>
</app-panel-data>
</app-panel>

Expand Down
4 changes: 4 additions & 0 deletions src/app/cdk/side-bar/side-bar/side-bar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ hr {
margin: 16px 0 16px 0;
}
}

.email-section {
padding-bottom: 0;
}

0 comments on commit bfeb0e9

Please sign in to comment.