From a23689bf47375c0435781e5f7cd6b16d077511f1 Mon Sep 17 00:00:00 2001 From: leomendoza123 Date: Tue, 26 Nov 2024 10:11:31 -0600 Subject: [PATCH] batch-fixes (#2403) * batch-fixes * 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.scss | 4 ++++ .../top-bar/top-bar.component.scss-theme.scss | 2 +- .../components/top-bar/top-bar.component.ts | 2 +- .../record/pages/my-orcid/my-orcid.component.ts | 2 +- 9 files changed, 34 insertions(+), 13 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..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,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.scss b/src/app/record/components/top-bar/top-bar.component.scss index 1cae0aa5d7..0ad4cc9b42 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; +} 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.ts b/src/app/record/pages/my-orcid/my-orcid.component.ts index a1564806c6..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,