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: Add condition to wait for sign in togglz #2193

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 @@ -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;
}
Loading