Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Display email verified notice panel #2198

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<ng-container *ngIf="signInUpdatesV1Togglz">
<app-my-orcid-alerts
*ngIf="
(signInUpdatesV1Togglz && (emailVerified || invalidVerifyUrl)) ||
(emailVerified || invalidVerifyUrl) ||
(printError && badCredentials)
"
[emailVerified]="emailVerified"
Expand Down
12 changes: 10 additions & 2 deletions src/app/sign-in/components/form-sign-in/form-sign-in.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ export class FormSignInComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() signInType: TypeSignIn
@Input() signInData: SignInData
@Input() signInUpdatesV1Togglz: boolean
@Input() emailVerified: boolean
@Input() invalidVerifyUrl: boolean
@Output() isOauthError = new EventEmitter<boolean>()
@Output() show2FAEmitter = new EventEmitter<object>()
@Output() loading = new EventEmitter<boolean>()
Expand All @@ -80,6 +78,8 @@ export class FormSignInComponent implements OnInit, AfterViewInit, OnDestroy {
private readonly $destroy = new Subject()
authorizationFormSubmitted: boolean
backendErrorsMatcher = new ErrorStateMatcherForPasswordField()
emailVerified: boolean
invalidVerifyUrl: boolean

placeholderUsername = $localize`:@@ngOrcid.signin.username:Email or 16-digit ORCID iD`
placeholderPassword = $localize`:@@ngOrcid.signin.yourOrcidPassword:Your ORCID password`
Expand Down Expand Up @@ -142,6 +142,14 @@ export class FormSignInComponent implements OnInit, AfterViewInit, OnDestroy {
}
})
}

if (platform.queryParameters.emailVerified) {
this.emailVerified = platform.queryParameters.emailVerified
}

if (platform.queryParameters.invalidVerifyUrl) {
this.invalidVerifyUrl = platform.queryParameters.invalidVerifyUrl
}
})
}

Expand Down
2 changes: 0 additions & 2 deletions src/app/sign-in/pages/sign-in/sign-in.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
[email]="email"
#formSignInComponent
[signInType]="signInType"
[emailVerified]="emailVerified"
[invalidVerifyUrl]="invalidVerifyUrl"
(show2FAEmitter)="show2FAEmitter($event)"
(isOauthError)="isOauthError = $event"
(errorDescription)="errorDescription = $event"
Expand Down
Loading