-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Add new authorize styling (#2182)
Co-authored-by: Daniel Palafox <[email protected]>
- Loading branch information
1 parent
673b797
commit c51c1ad
Showing
12 changed files
with
475 additions
and
159 deletions.
There are no files selected for viewing
421 changes: 281 additions & 140 deletions
421
src/app/authorize/components/form-authorize/form-authorize.component.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/app/authorize/components/form-authorize/form-authorize.component.scss-theme.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@use '@angular/material' as mat; | ||
@import 'src/assets/scss/material.orcid-theme.scss'; | ||
|
||
@mixin form-authorize-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$accent: map-get($theme, accent); | ||
$warn: map-get($theme, warn); | ||
$foreground: map-get($theme, foreground); | ||
$background: map-get($theme, background); | ||
|
||
.authorize-button { | ||
color: $orcid-light-primary-text; | ||
background: mat.get-color-from-palette($primary, 700); | ||
} | ||
} | ||
|
||
@include form-authorize-theme($orcid-app-theme); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
import { Component, OnInit } from '@angular/core' | ||
import { take } from 'rxjs/operators' | ||
import { PlatformInfo, PlatformInfoService } from 'src/app/cdk/platform-info' | ||
import { UserService } from 'src/app/core' | ||
import { TogglzService } from 'src/app/core/togglz/togglz.service' | ||
|
||
@Component({ | ||
templateUrl: './authorize.component.html', | ||
styleUrls: ['./authorize.component.scss'], | ||
preserveWhitespaces: true, | ||
}) | ||
export class AuthorizeComponent implements OnInit { | ||
platform: PlatformInfo | ||
showAuthorizationComponent: boolean | ||
constructor(_user: UserService) { | ||
signInUpdatesV1Togglz = false | ||
|
||
constructor( | ||
_user: UserService, | ||
private _platformInfo: PlatformInfoService, | ||
private _togglz: TogglzService, | ||
) { | ||
_user.getUserSession().subscribe((session) => { | ||
if (session.oauthSession && session.oauthSession.error) { | ||
this.showAuthorizationComponent = false | ||
} else { | ||
this.showAuthorizationComponent = true | ||
} | ||
}) | ||
_platformInfo.get().subscribe((platformInfo) => { | ||
this.platform = platformInfo | ||
}) | ||
} | ||
|
||
ngOnInit(): void {} | ||
ngOnInit(): void { | ||
this._togglz | ||
.getStateOf('SIGN_IN_UPDATES_V1') | ||
.pipe(take(1)) | ||
.subscribe((value) => (this.signInUpdatesV1Togglz = value)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
<div | ||
class="university-dropdown orc-font-body-large" | ||
[ngClass]="{ active: show }" | ||
(click)="show = !show" | ||
> | ||
<a class="mat-body-2 black-underline-url body-2 black-url" id="app-name"> | ||
<ng-container *ngIf="!signInUpdatesV1Togglz"> | ||
<div | ||
class="university-dropdown orc-font-body-large" | ||
[ngClass]="{ active: show }" | ||
(click)="show = !show" | ||
> | ||
<a class="mat-body-2 black-underline-url body-2 black-url" id="app-name"> | ||
{{ name }} | ||
</a> | ||
<mat-icon class="large-material-icon" role="presentation">help</mat-icon> | ||
</div> | ||
|
||
<div class="description-container" *ngIf="show"> | ||
{{ description }} | ||
</div> | ||
|
||
</ng-container> | ||
|
||
<ng-container *ngIf="signInUpdatesV1Togglz"> | ||
<div class="row"> | ||
<b class="orc-font-body m-b-16"> | ||
{{ name }} | ||
</b> | ||
<a | ||
class="underline " | ||
[ngClass]="{ 'm-b-16': show }" | ||
(click)="show = !show" | ||
> | ||
<ng-container i18n="@@shared.showDetails" *ngIf="!show">Show details</ng-container> | ||
<ng-container i18n="@@shared.hideDetails" *ngIf="show">Hide details</ng-container> | ||
</a> | ||
<mat-icon class="large-material-icon" role="presentation">help</mat-icon> | ||
</div> | ||
|
||
<div class="description-container" *ngIf="show"> | ||
<div class="description-container description-client" *ngIf="show"> | ||
{{ description }} | ||
</div> | ||
</ng-container> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/app/cdk/trusted-individuals-dropdown/trusted-individuals-dropdown.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters