Skip to content

Commit

Permalink
Merge branch 'main' into lmendoza/9422-email-domains-interstitial-oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 authored Nov 4, 2024
2 parents 2503b53 + 836362d commit 7dcee0b
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 8 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## v2.107.1 - 2024-10-30

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.0...v2.107.1)

## v2.107.0 - 2024-10-30

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.106.12...v2.107.0)

## v2.106.12 - 2024-10-28

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.106.11...v2.106.12)

## v2.106.11 - 2024-10-21

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.106.10...v2.106.11)

## v2.106.10 - 2024-10-17

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.106.9...v2.106.10)
Expand Down
12 changes: 10 additions & 2 deletions src/app/cdk/side-bar/modals/modal-email/modal-email.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ <h2 class="orc-font-body-large" i18n="@@side-bar.emailAddressesUppercase">
: email.sourceName || email.source
"
[isEmailOrDomain]="true"
[date]="email.verificationDate | monthDayYearDateToString"
[date]="
email.verificationDate
| monthDayYearDateToString
| verificationDateCutoff
"
[isLastItem]="true"
>
</app-panel-element-source>
Expand Down Expand Up @@ -312,7 +316,11 @@ <h2 class="orc-font-body-large" i18n="@@side-bar.emailAddressesUppercase">
class="orc-font-small-print"
[name]="orcidEmailValidation"
[isEmailOrDomain]="true"
[date]="domain.createdDate | monthDayYearDateToString"
[date]="
domain.createdDate
| monthDayYearDateToString
| verificationDateCutoff
"
[isLastItem]="true"
>
</app-panel-element-source>
Expand Down
12 changes: 10 additions & 2 deletions src/app/cdk/side-bar/side-bar/side-bar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ <h4 header i18n="@@side-bar.verifiedEmailAddresses">
: email.sourceName || email.source
"
[isEmailOrDomain]="true"
[date]="email.verificationDate | monthDayYearDateToString"
[date]="
email.verificationDate
| monthDayYearDateToString
| verificationDateCutoff
"
[isLastItem]="true"
>
</app-panel-element-source>
Expand Down Expand Up @@ -187,7 +191,11 @@ <h4 header i18n="@@side-bar.verifiedEmailDomains">
*ngIf="emailsOpenState"
[name]="orcidEmailValidation"
[isEmailOrDomain]="true"
[date]="domain.createdDate | monthDayYearDateToString"
[date]="
domain.createdDate
| monthDayYearDateToString
| verificationDateCutoff
"
[isLastItem]="true"
>
</app-panel-element-source>
Expand Down
2 changes: 2 additions & 0 deletions src/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export const ITEM_ACTION_SELECT = 'select'
export const ITEM_ACTION_EXPAND = 'expand'
export const ITEM_ACTION_COLLAPSE = 'collapse'

export const VERIFICATION_DATE_CUTOFF = new Date('2024-10-28')

export const ApplicationRoutes = {
myOrcid: 'my-orcid',
twoFactor: '2fa-signin',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { VerificationDateCutoffPipe } from './verification-date-cutoff.pipe'

describe('VerificationDateCutoffPipe', () => {
it('create an instance', () => {
const pipe = new VerificationDateCutoffPipe()
expect(pipe).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Pipe, PipeTransform } from '@angular/core'
import { VERIFICATION_DATE_CUTOFF } from 'src/app/constants'

@Pipe({
name: 'verificationDateCutoff',
})
export class VerificationDateCutoffPipe implements PipeTransform {
transform(value: string): string | null {
if (typeof value === 'string') {
const date = new Date(value)
if (date >= VERIFICATION_DATE_CUTOFF) {
return value
}
}
return null
}
}
3 changes: 3 additions & 0 deletions src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { AffiliationLabelPipe } from './pipes/affiliation-label.pipe'
import { AffiliationTypePipe } from './pipes/affiliation-type/affiliation-type.pipe'
import { ScopePathTypePipe } from './pipes/scope-path-type/scope-path-type.pipe'
import { AppPanelsSortByAriaLabelPipe } from './pipes/app-panels-sort-by-aria-label/app-panels-sort-by-aria-label.pipe'
import { VerificationDateCutoffPipe } from './pipes/verification-date-cutoff-pipe/verification-date-cutoff.pipe'
@NgModule({
imports: [
CommonModule,
Expand All @@ -60,6 +61,7 @@ import { AppPanelsSortByAriaLabelPipe } from './pipes/app-panels-sort-by-aria-la
],
declarations: [
MonthDayYearDateToStringPipe,
VerificationDateCutoffPipe,
OfflineMessageComponent,
CopyOnClickDirective,
CopyOnClickComponent,
Expand Down Expand Up @@ -107,6 +109,7 @@ import { AppPanelsSortByAriaLabelPipe } from './pipes/app-panels-sort-by-aria-la
MatProgressSpinner,
MatExpansionModule,
MonthDayYearDateToStringPipe,
VerificationDateCutoffPipe,
OfflineMessageComponent,
MatPaginatorModule,
CopyOnClickDirective,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ developerTools.readThePublicApisDocumentation=Ознакомиться с док
developerTools.fillOutMoreAobutTheDifferences=Подробнее о разнице между общедоступным API и API для подписчиков…
developerTools.orcidPublicClientTermsOfService=Условия использования общедоступного API ORCID
developerTools.theOrcidPublicApiAllowsYouToRequestPermission=Общедоступный API ORCID предоставляется бесплатно физическим лицам для некоммерческих целей согласно
developerTools.publicClientTermsOfService=Условиям использования общедоступного API.
developerTools.publicClientTermsOfService=его Условиям использования.
developerTools.youMustAcceptThePublicClientTermsOfService=Перед регистрацией для получения данных общедоступного API примите условия использования сервиса.
developerTools.haveReadAndAgreeToTheOrcidPublicClientTermsOfService=Я принимаю Условия использования общедоступного API ORCID
developerTools.registerForYourOrcidPublicApiCredentials=Чтобы получить данные общедоступного API ORCID, пройдите регистрацию
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9850,9 +9850,9 @@ http-proxy-agent@^7.0.0:
debug "^4.3.4"

http-proxy-middleware@^2.0.3:
version "2.0.6"
resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz"
integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==
version "2.0.7"
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz#915f236d92ae98ef48278a95dedf17e991936ec6"
integrity sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==
dependencies:
"@types/http-proxy" "^1.17.8"
http-proxy "^1.18.1"
Expand Down

0 comments on commit 7dcee0b

Please sign in to comment.