Skip to content

Commit

Permalink
Merge pull request #2193 from ORCID/fix/9135-qa-old-oauth-screen-brie…
Browse files Browse the repository at this point in the history
…fly-displayed-when-switching-accounts

fix: Add condition to wait for sign in togglz
  • Loading branch information
leomendoza123 authored Mar 13, 2024
2 parents 5aacdf5 + a2431c5 commit 712103b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@

<ng-container *ngIf="signInUpdatesV1Togglz">
<mat-progress-bar
class="progress-bar"
id="loading-bar"
*ngIf="
loadingUserInfo || loadingTrustedIndividuals || loadingAuthorizeEndpoint
Expand Down
2 changes: 1 addition & 1 deletion src/app/authorize/pages/authorize/authorize.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
>
<app-form-authorize
[signInUpdatesV1Togglz]="signInUpdatesV1Togglz"
*ngIf="showAuthorizationComponent"
*ngIf="showAuthorizationComponent && !loading"
></app-form-authorize>
<app-oauth-error
*ngIf="!showAuthorizationComponent"
Expand Down
8 changes: 6 additions & 2 deletions src/app/authorize/pages/authorize/authorize.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ export class AuthorizeComponent implements OnInit {
platform: PlatformInfo
showAuthorizationComponent: boolean
signInUpdatesV1Togglz = false
loading = true

constructor(
_user: UserService,
private _platformInfo: PlatformInfoService,
private _togglz: TogglzService
) {
_user.getUserSession().subscribe((session) => {
_user.getUserSession().subscribe((session) => {
if (session.oauthSession && session.oauthSession.error) {
this.showAuthorizationComponent = false
} else {
Expand All @@ -36,6 +37,9 @@ export class AuthorizeComponent implements OnInit {
this._togglz
.getStateOf('SIGN_IN_UPDATES_V1')
.pipe(take(1))
.subscribe((value) => (this.signInUpdatesV1Togglz = value))
.subscribe((value) => {
this.loading = false;
this.signInUpdatesV1Togglz = value
})
}
}
74 changes: 39 additions & 35 deletions src/app/cdk/info-drop-down/info-drop-down.component.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
.description-container {
padding: 8px;
margin-top: 4px;
margin-bottom: 8px;
max-width: 100%;
width: 100%;
display: inline-block;
overflow: hidden;
word-break: break-word;
box-sizing: border-box;
}
.description-client {
margin: 0 !important;
}
mat-icon {
margin-top: 2px; // Compensates mat icon bottom with space
margin-left: 4px;
[dir='rtl'] & {
margin-right: 4px;
}

text-decoration: none !important;
}

.university-dropdown {
display: flex;
font-weight: bold;
mat-icon {
cursor: pointer;
}
}

:host {
display: block;
}
.description-container {
padding: 8px;
margin-top: 4px;
margin-bottom: 8px;
max-width: 100%;
width: 100%;
display: inline-block;
overflow: hidden;
word-break: break-word;
box-sizing: border-box;
}
.description-client {
margin: 0 !important;
}
b {
word-break: break-all;
}

mat-icon {
margin-top: 2px; // Compensates mat icon bottom with space
margin-left: 4px;
[dir='rtl'] & {
margin-right: 4px;
}

text-decoration: none !important;
}

.university-dropdown {
display: flex;
font-weight: bold;
mat-icon {
cursor: pointer;
}
}

:host {
display: block;
}

0 comments on commit 712103b

Please sign in to comment.