@for (link of links.controls; track index; let index = $index) {
diff --git a/src/app/features/settings/profile-settings/components/social/social.component.spec.ts b/src/app/features/settings/profile-settings/components/social/social.component.spec.ts
index 06a51c93d..c7889e9c0 100644
--- a/src/app/features/settings/profile-settings/components/social/social.component.spec.ts
+++ b/src/app/features/settings/profile-settings/components/social/social.component.spec.ts
@@ -8,6 +8,7 @@ import { CustomConfirmationService } from '@osf/shared/services/custom-confirmat
import { LoaderService } from '@osf/shared/services/loader.service';
import { ToastService } from '@osf/shared/services/toast.service';
+import { AuthenticatedIdentityComponent } from '../authenticated-identity/authenticated-identity.component';
import { SocialFormComponent } from '../social-form/social-form.component';
import { SocialComponent } from './social.component';
@@ -24,7 +25,12 @@ describe('SocialComponent', () => {
jest.clearAllMocks();
await TestBed.configureTestingModule({
- imports: [SocialComponent, MockComponent(SocialFormComponent), MockPipe(TranslatePipe)],
+ imports: [
+ SocialComponent,
+ MockComponent(SocialFormComponent),
+ MockComponent(AuthenticatedIdentityComponent),
+ MockPipe(TranslatePipe),
+ ],
providers: [
provideMockStore({
signals: [{ selector: UserSelectors.getSocialLinks, value: MOCK_USER.social }],
diff --git a/src/app/features/settings/profile-settings/components/social/social.component.ts b/src/app/features/settings/profile-settings/components/social/social.component.ts
index 5499e59df..30db0debb 100644
--- a/src/app/features/settings/profile-settings/components/social/social.component.ts
+++ b/src/app/features/settings/profile-settings/components/social/social.component.ts
@@ -25,11 +25,12 @@ import { SocialModel } from '@shared/models/user/social.model';
import { SocialLinksForm } from '@shared/models/user/social-links.model';
import { hasSocialLinkChanges, mapSocialLinkToPayload } from '../../helpers';
+import { AuthenticatedIdentityComponent } from '../authenticated-identity/authenticated-identity.component';
import { SocialFormComponent } from '../social-form/social-form.component';
@Component({
selector: 'osf-social',
- imports: [Button, ReactiveFormsModule, SocialFormComponent, TranslatePipe],
+ imports: [Button, ReactiveFormsModule, SocialFormComponent, AuthenticatedIdentityComponent, TranslatePipe],
templateUrl: './social.component.html',
styleUrl: './social.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -52,7 +53,9 @@ export class SocialComponent {
readonly socialLinksForm = this.fb.group({ links: this.fb.array
([]) });
constructor() {
- effect(() => this.setInitialData());
+ effect(() => {
+ this.setInitialData();
+ });
}
get links(): FormArray {
diff --git a/src/app/shared/enums/external-identity-status.enum.ts b/src/app/shared/enums/external-identity-status.enum.ts
new file mode 100644
index 000000000..f12d85dbb
--- /dev/null
+++ b/src/app/shared/enums/external-identity-status.enum.ts
@@ -0,0 +1,5 @@
+export enum ExternalIdentityStatus {
+ VERIFIED = 'VERIFIED',
+ LINK = 'LINK',
+ CREATE = 'CREATE',
+}
diff --git a/src/app/shared/models/user/external-identity.model.ts b/src/app/shared/models/user/external-identity.model.ts
index 9703400e0..9b88bdc41 100644
--- a/src/app/shared/models/user/external-identity.model.ts
+++ b/src/app/shared/models/user/external-identity.model.ts
@@ -1,6 +1,8 @@
+import { ExternalIdentityStatus } from '@osf/shared/enums/external-identity-status.enum';
+
export interface OrcidInfo {
id: string;
- status: string;
+ status: ExternalIdentityStatus;
}
export interface ExternalIdentityModel {
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index 9ee6ffb5c..42651e0ab 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -1848,9 +1848,13 @@
"successUpdate": "Settings successfully updated."
},
"social": {
+ "connectOrcid": "Connect ORCID",
+ "disconnectOrcid": "Disconnect ORCID",
+ "orcidDescription": "Link your ORCID. ORCID is a free, unique, persistent identifier (PID) for individuals to use as they engage in research, scholarship, and innovation activities. Learn how ORCID can help you spend more time conducting your research and less time managing it. Learn more about ORCID.",
"title": "Social Link {{index}}",
"successUpdate": "Social successfully updated.",
"labels": {
+ "authenticatedIdentity": "Authenticated identity",
"researcherId": "ResearcherID",
"orcid": "ORCID",
"linkedIn": "LinkedIn",