From 0c9c91af911e48200d1b53ed34936ca7f4d0b2d1 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Tue, 26 Nov 2024 09:58:33 -0600 Subject: [PATCH 1/4] batch-fixes --- .../pages/authorize/authorize.component.ts | 6 +++--- .../cdk/interstitials/interstitials.service.ts | 2 +- .../share-emails-domains-dialog.component.scss | 8 +++++++- .../share-emails-domains-dialog.component.ts | 17 ++++++++++++++--- .../login-interstitials.service.ts | 4 ++-- .../components/top-bar/top-bar.component.html | 2 +- .../components/top-bar/top-bar.component.scss | 4 ++++ .../top-bar/top-bar.component.scss-theme.scss | 2 +- .../components/top-bar/top-bar.component.ts | 2 +- .../pages/my-orcid/my-orcid.component.scss | 1 + .../record/pages/my-orcid/my-orcid.component.ts | 2 +- 11 files changed, 36 insertions(+), 14 deletions(-) diff --git a/src/app/authorize/pages/authorize/authorize.component.ts b/src/app/authorize/pages/authorize/authorize.component.ts index 45eeb7e42e..181431f82a 100644 --- a/src/app/authorize/pages/authorize/authorize.component.ts +++ b/src/app/authorize/pages/authorize/authorize.component.ts @@ -59,13 +59,13 @@ export class AuthorizeComponent { userInfo.userInfo.EFFECTIVE_USER_ORCID }) this._interstitials - .getInterstitialsViewed('OAUTH_DOMAIN_INTERSTITIAL') + .getInterstitialsViewed('DOMAIN_INTERSTITIAL') .subscribe((value) => { return (this.domainInterstitialHasBeenViewed = value) }) this._togglz - .getStateOf('OAUTH_DOMAINS_INTERSTITIAL') + .getStateOf('DOMAINS_INTERSTITIAL') .pipe(take(1)) .subscribe((value) => { this.oauthDomainsInterstitialEnabled = value @@ -104,7 +104,7 @@ export class AuthorizeComponent { this.showAuthorizationComponent = false this.showInterstital = true this._interstitials - .setInterstitialsViewed('OAUTH_DOMAIN_INTERSTITIAL') + .setInterstitialsViewed('DOMAIN_INTERSTITIAL') .subscribe() } else { this.finishRedirect() diff --git a/src/app/cdk/interstitials/interstitials.service.ts b/src/app/cdk/interstitials/interstitials.service.ts index 831f4ff16b..29e24af398 100644 --- a/src/app/cdk/interstitials/interstitials.service.ts +++ b/src/app/cdk/interstitials/interstitials.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core' import { userInfo } from 'os' import { map } from 'rxjs/operators' import { UserService } from 'src/app/core' -type Interstitials = 'OAUTH_DOMAIN_INTERSTITIAL' | 'SIGN_IN_DOMAIN_INTERSTITIAL' +type Interstitials = 'DOMAIN_INTERSTITIAL' @Injectable({ providedIn: 'root', diff --git a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss index d4fd26a48d..d8c736ac12 100644 --- a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss +++ b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss @@ -1,12 +1,18 @@ +@import './share-emails-domains.component.scss'; + mat-card-header.authorize-header { mat-card-title { margin: 0 0 32px 0 !important; display: flex; flex-direction: column; align-items: center; + h1 { + text-align: center; + } } } -:host { + +:host.columns-12 { padding: 48px; display: block; } diff --git a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts index a6ca9c7cbb..12f5771131 100644 --- a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts +++ b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts @@ -1,4 +1,11 @@ -import { Component, EventEmitter, Inject, Input, Output } from '@angular/core' +import { + Component, + EventEmitter, + HostBinding, + Inject, + Input, + Output, +} from '@angular/core' import { PlatformInfoService } from '../../platform-info' import { AssertionVisibilityString, EmailsEndpoint } from 'src/app/types' import { FormBuilder, FormControl, FormGroup } from '@angular/forms' @@ -20,12 +27,13 @@ export type ShareEmailsDomainsComponentDialogInput = { @Component({ templateUrl: './share-emails-domains.component.html', styleUrls: [ - './share-emails-domains.component.scss', - './share-emails-domains.component.scss-theme.scss', './share-emails-domains-dialog.component.scss', + './share-emails-domains.component.scss-theme.scss', ], }) export class ShareEmailsDomainsDialogComponent extends ShareEmailsDomainsComponent { + @HostBinding('class.columns-12') desktop: boolean = false + constructor( platformInfo: PlatformInfoService, fb: FormBuilder, @@ -40,6 +48,9 @@ export class ShareEmailsDomainsDialogComponent extends ShareEmailsDomainsCompone this.userEmailsJson = this.data.userEmailsJson this.organizationName = this.data.organizationName } + platformInfo.get().subscribe((data) => { + this.desktop = data.desktop + }) } override finishIntertsitial(emails?: string[]) { diff --git a/src/app/core/login-interstitials/login-interstitials.service.ts b/src/app/core/login-interstitials/login-interstitials.service.ts index dddddedc21..700664b36e 100644 --- a/src/app/core/login-interstitials/login-interstitials.service.ts +++ b/src/app/core/login-interstitials/login-interstitials.service.ts @@ -25,7 +25,7 @@ export class LoginInterstitialsService { private toggleService: TogglzService ) { this.interstitialService - .getInterstitialsViewed('SIGN_IN_DOMAIN_INTERSTITIAL') + .getInterstitialsViewed('DOMAIN_INTERSTITIAL') .subscribe((viewed) => { this.alreadySawSignDomainInterstitial = viewed }) @@ -56,7 +56,7 @@ export class LoginInterstitialsService { ) { this.alreadySawSignDomainInterstitial = true this.interstitialService - .setInterstitialsViewed('SIGN_IN_DOMAIN_INTERSTITIAL') + .setInterstitialsViewed('DOMAIN_INTERSTITIAL') .subscribe() const data: ShareEmailsDomainsComponentDialogInput = { userEmailsJson: userRecord.emails, diff --git a/src/app/record/components/top-bar/top-bar.component.html b/src/app/record/components/top-bar/top-bar.component.html index 7c7ab37756..df45b53fab 100644 --- a/src/app/record/components/top-bar/top-bar.component.html +++ b/src/app/record/components/top-bar/top-bar.component.html @@ -13,7 +13,7 @@ > - + Your account has been locked diff --git a/src/app/record/components/top-bar/top-bar.component.scss b/src/app/record/components/top-bar/top-bar.component.scss index 1cae0aa5d7..800f0ac86f 100644 --- a/src/app/record/components/top-bar/top-bar.component.scss +++ b/src/app/record/components/top-bar/top-bar.component.scss @@ -146,3 +146,7 @@ app-top-bar-actions { margin-top: 0 !important; } } + +app-warning-message { + margin-bottom: 16px; +} \ No newline at end of file diff --git a/src/app/record/components/top-bar/top-bar.component.scss-theme.scss b/src/app/record/components/top-bar/top-bar.component.scss-theme.scss index 72fff40097..06bca69303 100644 --- a/src/app/record/components/top-bar/top-bar.component.scss-theme.scss +++ b/src/app/record/components/top-bar/top-bar.component.scss-theme.scss @@ -9,7 +9,7 @@ $background: map-get($theme, background); .green-url { - color: $brand-primary-dark; + color: mat.get-color-from-palette($accent, 900); } .published-name { color: $text-dark-high; diff --git a/src/app/record/components/top-bar/top-bar.component.ts b/src/app/record/components/top-bar/top-bar.component.ts index 4fdaa9b310..5147209953 100644 --- a/src/app/record/components/top-bar/top-bar.component.ts +++ b/src/app/record/components/top-bar/top-bar.component.ts @@ -48,7 +48,7 @@ export class TopBarComponent implements OnInit, OnDestroy { checkEmailValidated: boolean inDelegationMode: boolean - @Input() newlySharedDomains: string[] = ['test'] + @Input() newlySharedDomains: string[] = [] @Input() loadingUserRecord = true regionNames = $localize`:@@topBar.names:Names` diff --git a/src/app/record/pages/my-orcid/my-orcid.component.scss b/src/app/record/pages/my-orcid/my-orcid.component.scss index 55631530c9..1c24c6d858 100644 --- a/src/app/record/pages/my-orcid/my-orcid.component.scss +++ b/src/app/record/pages/my-orcid/my-orcid.component.scss @@ -85,3 +85,4 @@ h2.public-info { padding: 0; margin-bottom: 1em; } + diff --git a/src/app/record/pages/my-orcid/my-orcid.component.ts b/src/app/record/pages/my-orcid/my-orcid.component.ts index a1564806c6..7e5d33b732 100644 --- a/src/app/record/pages/my-orcid/my-orcid.component.ts +++ b/src/app/record/pages/my-orcid/my-orcid.component.ts @@ -82,7 +82,7 @@ export class MyOrcidComponent implements OnInit, OnDestroy { regionActivities = $localize`:@@shared.activities:Activities` readyForIndexing: boolean fragment: string - newlySharedDomains: string[] + newlySharedDomains: string[]= ['test'] constructor( _userInfoService: UserInfoService, From 37ff231299af42f0ca3d3cabd6016007bb249772 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Tue, 26 Nov 2024 10:02:41 -0600 Subject: [PATCH 2/4] batch-fixes --- .../share-emails-domains-dialog.component.scss | 2 +- src/app/record/components/top-bar/top-bar.component.html | 2 +- src/app/record/components/top-bar/top-bar.component.scss | 2 +- src/app/record/pages/my-orcid/my-orcid.component.scss | 1 - src/app/record/pages/my-orcid/my-orcid.component.ts | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss index d8c736ac12..fe89797cac 100644 --- a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss +++ b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss @@ -1,4 +1,4 @@ -@import './share-emails-domains.component.scss'; +@import './share-emails-domains.component.scss'; mat-card-header.authorize-header { mat-card-title { diff --git a/src/app/record/components/top-bar/top-bar.component.html b/src/app/record/components/top-bar/top-bar.component.html index df45b53fab..7c7ab37756 100644 --- a/src/app/record/components/top-bar/top-bar.component.html +++ b/src/app/record/components/top-bar/top-bar.component.html @@ -13,7 +13,7 @@ > - + Your account has been locked diff --git a/src/app/record/components/top-bar/top-bar.component.scss b/src/app/record/components/top-bar/top-bar.component.scss index 800f0ac86f..0ad4cc9b42 100644 --- a/src/app/record/components/top-bar/top-bar.component.scss +++ b/src/app/record/components/top-bar/top-bar.component.scss @@ -149,4 +149,4 @@ app-top-bar-actions { app-warning-message { margin-bottom: 16px; -} \ No newline at end of file +} diff --git a/src/app/record/pages/my-orcid/my-orcid.component.scss b/src/app/record/pages/my-orcid/my-orcid.component.scss index 1c24c6d858..55631530c9 100644 --- a/src/app/record/pages/my-orcid/my-orcid.component.scss +++ b/src/app/record/pages/my-orcid/my-orcid.component.scss @@ -85,4 +85,3 @@ h2.public-info { padding: 0; margin-bottom: 1em; } - diff --git a/src/app/record/pages/my-orcid/my-orcid.component.ts b/src/app/record/pages/my-orcid/my-orcid.component.ts index 7e5d33b732..cdcd04d648 100644 --- a/src/app/record/pages/my-orcid/my-orcid.component.ts +++ b/src/app/record/pages/my-orcid/my-orcid.component.ts @@ -82,7 +82,7 @@ export class MyOrcidComponent implements OnInit, OnDestroy { regionActivities = $localize`:@@shared.activities:Activities` readyForIndexing: boolean fragment: string - newlySharedDomains: string[]= ['test'] + newlySharedDomains: string[] = [] constructor( _userInfoService: UserInfoService, From d9af46e1c3fd713cfe34779a2c7b4924cfca65c3 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Tue, 26 Nov 2024 10:52:01 -0600 Subject: [PATCH 3/4] singin-interstitial-2 --- .../share-emails-domains-dialog.component.scss | 7 +++++-- src/app/record/pages/my-orcid/my-orcid.component.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss index fe89797cac..81f443d12b 100644 --- a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss +++ b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.scss @@ -2,7 +2,7 @@ mat-card-header.authorize-header { mat-card-title { - margin: 0 0 32px 0 !important; + margin: 0 0 24px 0 !important; display: flex; flex-direction: column; align-items: center; @@ -10,9 +10,12 @@ mat-card-header.authorize-header { text-align: center; } } + mat-icon { + margin-bottom: 8px; + } } :host.columns-12 { - padding: 48px; + padding: 40px; display: block; } diff --git a/src/app/record/pages/my-orcid/my-orcid.component.ts b/src/app/record/pages/my-orcid/my-orcid.component.ts index cdcd04d648..305c01ed1c 100644 --- a/src/app/record/pages/my-orcid/my-orcid.component.ts +++ b/src/app/record/pages/my-orcid/my-orcid.component.ts @@ -82,7 +82,7 @@ export class MyOrcidComponent implements OnInit, OnDestroy { regionActivities = $localize`:@@shared.activities:Activities` readyForIndexing: boolean fragment: string - newlySharedDomains: string[] = [] + newlySharedDomains: string[]= [] constructor( _userInfoService: UserInfoService, From d92dda18f892650dd122f2aa7704c3bf7724ef94 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Tue, 26 Nov 2024 10:52:35 -0600 Subject: [PATCH 4/4] singin-interstitial-2 --- src/app/record/pages/my-orcid/my-orcid.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/record/pages/my-orcid/my-orcid.component.ts b/src/app/record/pages/my-orcid/my-orcid.component.ts index 305c01ed1c..cdcd04d648 100644 --- a/src/app/record/pages/my-orcid/my-orcid.component.ts +++ b/src/app/record/pages/my-orcid/my-orcid.component.ts @@ -82,7 +82,7 @@ export class MyOrcidComponent implements OnInit, OnDestroy { regionActivities = $localize`:@@shared.activities:Activities` readyForIndexing: boolean fragment: string - newlySharedDomains: string[]= [] + newlySharedDomains: string[] = [] constructor( _userInfoService: UserInfoService,