-
+ } @else {
+
+ }
diff --git a/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.scss b/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.scss
index 4dd2d103dc..325a40944c 100644
--- a/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.scss
+++ b/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.scss
@@ -1,3 +1,7 @@
+p {
+ margin: 0;
+}
+
ul {
padding-inline-start: 8px;
li {
@@ -7,7 +11,6 @@ ul {
.button-container {
display: flex;
align-items: row;
- margin-top: 16px;
}
:host {
diff --git a/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.scss-theme.scss b/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.scss-theme.scss
new file mode 100644
index 0000000000..b914d81aab
--- /dev/null
+++ b/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.scss-theme.scss
@@ -0,0 +1,26 @@
+@use '@angular/material' as mat;
+@import 'src/assets/scss/material.orcid-theme.scss';
+
+@mixin settings-actions-duplicated($theme) {
+ $primary: map-get($theme, primary);
+ $accent: map-get($theme, accent);
+ $warn: map-get($theme, accent);
+ $foreground: map-get($theme, foreground);
+ $background: map-get($theme, background);
+
+ .cy-remove-duplicated-record {
+ background: $brand-secondary-dark !important;
+ color: white !important;
+ }
+
+ .cy-remove-duplicated-record[disabled] {
+ opacity: 30%;
+ }
+
+ #cy-remove-duplicate-record {
+ background-color: $state-warning-darkest !important;
+ color: white !important;
+ }
+}
+
+@include settings-actions-duplicated($orcid-app-theme);
diff --git a/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.ts b/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.ts
index f041e5b100..e75d6b4e4b 100644
--- a/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.ts
+++ b/src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.ts
@@ -1,28 +1,44 @@
-import { Component, EventEmitter, OnInit, Output } from '@angular/core'
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import {
+ FormGroupDirective,
+ NgForm,
UntypedFormBuilder,
+ UntypedFormControl,
UntypedFormGroup,
Validators,
} from '@angular/forms'
import { MatDialog } from '@angular/material/dialog'
import { of, throwError } from 'rxjs'
-import { switchMap, take } from 'rxjs/operators'
+import { switchMap, take, takeUntil } from 'rxjs/operators'
import { UserService } from 'src/app/core'
import { AccountActionsDuplicatedService } from 'src/app/core/account-actions-duplicated/account-actions-duplicated.service'
import { UserSession } from 'src/app/types/session.local'
-import { DialogActionsDuplicatedMergedConfirmedComponent } from '../dialog-actions-duplicated-merged-confirmed/dialog-actions-duplicated-merged-confirmed.component'
-import { DialogActionsDuplicatedTwoFactorAuthComponent } from '../dialog-actions-duplicated-two-factor-auth/dialog-actions-duplicated-two-factor-auth.component'
-import { DialogActionsDuplicatedComponent } from '../dialog-actions-duplicated/dialog-actions-duplicated.component'
-
+import { AuthChallengeComponent } from '@orcid/registry-ui'
+import { AuthChallengeFormData } from '../../../types/common.endpoint'
+import { DuplicateRemoveEndpoint } from '../../../types/account-actions-duplicated'
+import { ErrorStateMatcherForTwoFactorFields } from '../../../sign-in/ErrorStateMatcherForTwoFactorFields'
+import { ErrorStateMatcher } from '@angular/material/core'
+export class NeverShowErrorMatcher implements ErrorStateMatcher {
+ isErrorState(
+ control: UntypedFormControl | null,
+ form: FormGroupDirective | NgForm | null
+ ): boolean {
+ return false
+ }
+}
@Component({
selector: 'app-settings-actions-duplicated',
templateUrl: './settings-actions-duplicated.component.html',
- styleUrls: ['./settings-actions-duplicated.component.scss'],
+ styleUrls: [
+ './settings-actions-duplicated.component.scss',
+ './settings-actions-duplicated.component.scss-theme.scss',
+ ],
preserveWhitespaces: true,
standalone: false,
})
export class SettingsActionsDuplicatedComponent implements OnInit {
+ errorMatcher = new NeverShowErrorMatcher()
userSession: UserSession
constructor(
private _duplicateService: AccountActionsDuplicatedService,
@@ -33,79 +49,139 @@ export class SettingsActionsDuplicatedComponent implements OnInit {
@Output() loading = new EventEmitter