Skip to content

Commit 0c5db72

Browse files
committed
Merge branch 'refs/heads/main' into fix/search-updates
2 parents c228a8a + 7a44d8a commit 0c5db72

File tree

89 files changed

+360
-414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+360
-414
lines changed

src/app/core/store/user/user.state.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ export class UserState {
145145
data: user,
146146
},
147147
});
148+
149+
localStorage.setItem('currentUser', JSON.stringify(user));
148150
})
149151
);
150152
}
@@ -168,6 +170,8 @@ export class UserState {
168170
data: user,
169171
},
170172
});
173+
174+
localStorage.setItem('currentUser', JSON.stringify(user));
171175
})
172176
);
173177
}
@@ -191,6 +195,8 @@ export class UserState {
191195
data: user,
192196
},
193197
});
198+
199+
localStorage.setItem('currentUser', JSON.stringify(user));
194200
})
195201
);
196202
}
@@ -221,6 +227,8 @@ export class UserState {
221227
data: user,
222228
},
223229
});
230+
231+
localStorage.setItem('currentUser', JSON.stringify(user));
224232
})
225233
);
226234
}

src/app/features/my-projects/components/create-project-dialog/create-project-dialog.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { DynamicDialogRef } from 'primeng/dynamicdialog';
88
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
99
import { FormControl, FormGroup, Validators } from '@angular/forms';
1010

11+
import { AddProjectFormComponent } from '@osf/shared/components';
1112
import { MY_PROJECTS_TABLE_PARAMS } from '@osf/shared/constants';
13+
import { ProjectFormControls } from '@osf/shared/enums';
1214
import { CustomValidators } from '@osf/shared/helpers';
13-
import { AddProjectFormComponent } from '@shared/components';
14-
import { ProjectFormControls } from '@shared/enums';
15-
import { ProjectForm } from '@shared/models';
16-
import { CreateProject, GetMyProjects, MyResourcesSelectors } from '@shared/stores';
15+
import { ProjectForm } from '@osf/shared/models';
16+
import { CreateProject, GetMyProjects, MyResourcesSelectors } from '@osf/shared/stores';
1717

1818
@Component({
1919
selector: 'osf-create-project-dialog',

src/app/features/my-projects/mappers/my-resources.mapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MyResourcesItem, MyResourcesItemGetResponseJsonApi } from 'src/app/shared/models/my-resources';
1+
import { MyResourcesItem, MyResourcesItemGetResponseJsonApi } from '@osf/shared/models';
22

33
export class MyResourcesMapper {
44
static fromResponse(response: MyResourcesItemGetResponseJsonApi): MyResourcesItem {

src/app/features/my-projects/my-projects.component.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,26 @@ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
2323
import { FormControl, FormsModule } from '@angular/forms';
2424
import { ActivatedRoute, Router } from '@angular/router';
2525

26-
import { CreateProjectDialogComponent } from '@osf/features/my-projects/components';
2726
import { MyProjectsTableComponent, SelectComponent, SubHeaderComponent } from '@osf/shared/components';
2827
import { MY_PROJECTS_TABLE_PARAMS } from '@osf/shared/constants';
2928
import { ResourceType, SortOrder } from '@osf/shared/enums';
3029
import { IS_MEDIUM, parseQueryFilterParams } from '@osf/shared/helpers';
31-
import { QueryParams, TableParameters } from '@osf/shared/models';
32-
import { BookmarksSelectors, GetBookmarksCollectionId } from '@osf/shared/stores';
30+
import { MyResourcesItem, MyResourcesSearchFilters, QueryParams, TableParameters } from '@osf/shared/models';
3331
import {
32+
BookmarksSelectors,
3433
ClearMyResources,
34+
GetBookmarksCollectionId,
3535
GetMyBookmarks,
3636
GetMyPreprints,
3737
GetMyProjects,
3838
GetMyRegistrations,
3939
MyResourcesSelectors,
40-
} from '@shared/stores';
40+
} from '@osf/shared/stores';
4141

42+
import { CreateProjectDialogComponent } from './components';
4243
import { MY_PROJECTS_TABS } from './constants';
4344
import { MyProjectsTab } from './enums';
4445

45-
import { MyResourcesItem, MyResourcesSearchFilters } from 'src/app/shared/models/my-resources';
46-
4746
@Component({
4847
selector: 'osf-my-projects',
4948
imports: [

src/app/features/preprints/pages/landing/preprints-landing.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ <h2 class="text-2xl">{{ 'preprints.createServer.title' | translate }}</h2>
7373
</a>
7474
{{ 'preprints.createServer.and' | translate }}
7575
<a class="font-bold" href="https://www.cos.io/product-roadmap" target="_blank">
76-
{{ 'preprints.createServer.publicRoadmap' | translate }} </a
76+
{{ 'preprints.createServer.publicRoadmap' | translate }}</a
7777
>. {{ 'preprints.createServer.inputWelcome' | translate }}
7878
</p>
7979
</div>

src/app/features/project/analytics/components/view-duplicates/view-duplicates.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="flex flex-column flex-1 bg-white gap-5 p-3 sm:p-4">
99
@if (!isDuplicatesLoading() && currentResource()) {
1010
@if (!duplicates().length) {
11-
<h3 class="mt-5 text-center">{{ 'project.overview.dialog.fork.noForksMessage' | translate }}</h3>
11+
<p class="mt-5 text-center">{{ 'project.overview.dialog.fork.noForksMessage' | translate }}</p>
1212
} @else {
1313
<p>{{ 'project.overview.dialog.fork.forksMessage' | translate }}</p>
1414

@@ -63,7 +63,7 @@ <h2 class="flex align-items-center gap-2">
6363
</div>
6464

6565
<div class="component-description">
66-
<div class="flex flex-wrap align-items-center gap-1">
66+
<div class="flex flex-wrap align-items-baseline gap-1">
6767
<span class="font-bold">{{ 'common.labels.description' | translate }}:</span>
6868
<osf-truncated-text [text]="duplicate.description" />
6969
</div>

src/app/features/project/contributors/components/create-view-link-dialog/create-view-link-dialog.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949
<p-button
5050
class="w-full"
5151
styleClass="w-full"
52-
(click)="dialogRef.close()"
52+
(onClick)="dialogRef.close()"
5353
severity="info"
5454
[label]="'project.contributors.addDialog.cancel' | translate"
5555
></p-button>
5656

5757
<p-button
5858
class="w-full"
5959
styleClass="w-full"
60-
(click)="addLink()"
60+
(onClick)="addLink()"
6161
[label]="'project.contributors.addDialog.next' | translate"
6262
></p-button>
6363
</div>

src/app/features/project/contributors/contributors.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h1 class="py-5 px-3 md:px-5 xl:px-4">{{ 'navigation.contributors' | translate }
44
<p-button
55
[label]="'project.contributors.addContributor' | translate"
66
[disabled]="isContributorsLoading()"
7-
(click)="openAddContributorDialog()"
7+
(onClick)="openAddContributorDialog()"
88
></p-button>
99

1010
<div class="filters-container flex flex-column xl:flex-row">
@@ -73,13 +73,13 @@ <h1 class="py-5 px-3 md:px-5 xl:px-4">{{ 'navigation.contributors' | translate }
7373
<p-button
7474
class="w-3"
7575
styleClass="w-full"
76-
(click)="cancel()"
76+
(onClick)="cancel()"
7777
severity="info"
7878
[label]="'common.buttons.cancel' | translate"
7979
>
8080
</p-button>
8181

82-
<p-button class="w-3" styleClass="w-full" (click)="save()" [label]="'common.buttons.save' | translate">
82+
<p-button class="w-3" styleClass="w-full" (onClick)="save()" [label]="'common.buttons.save' | translate">
8383
</p-button>
8484
</div>
8585
}
@@ -89,7 +89,7 @@ <h2>{{ 'project.contributors.viewOnly' | translate }}</h2>
8989

9090
<p>{{ 'project.contributors.createLink' | translate }}</p>
9191

92-
<p-button class="w-10rem" [label]="'project.contributors.createButton' | translate" (click)="createViewLink()">
92+
<p-button class="w-10rem" [label]="'project.contributors.createButton' | translate" (onClick)="createViewLink()">
9393
</p-button>
9494

9595
<osf-view-only-table

src/app/features/project/overview/components/add-component-dialog/add-component-dialog.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ChangeDetectionStrategy, Component, DestroyRef, inject, OnInit } from '
1515
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
1616
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
1717

18-
import { STORAGE_LOCATIONS } from '@osf/core/constants';
18+
import { STORAGE_LOCATIONS } from '@core/constants';
1919
import { ComponentFormControls } from '@osf/shared/enums';
2020
import { IS_XSMALL } from '@osf/shared/helpers';
2121
import { ComponentForm } from '@osf/shared/models';
@@ -43,7 +43,8 @@ import { CreateComponent, GetComponents, ProjectOverviewSelectors } from '../../
4343
})
4444
export class AddComponentDialogComponent implements OnInit {
4545
private store = inject(Store);
46-
private toastService = inject(ToastService);
46+
private readonly toastService = inject(ToastService);
47+
4748
protected isMobile = toSignal(inject(IS_XSMALL));
4849
protected dialogRef = inject(DynamicDialogRef);
4950
protected destroyRef = inject(DestroyRef);

src/app/features/project/overview/components/delete-component-dialog/delete-component-dialog.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
{{ 'project.overview.dialog.deleteComponent.confirmation' | translate }}
55
<strong> {{ selectedScientist() }}</strong>
66
</p>
7+
78
<input pInputText class="mt-3" [ngModel]="userInput()" (ngModelChange)="onInputChange($event)" />
9+
810
<div class="flex pt-5 justify-content-end gap-3">
911
<p-button
1012
class="w-12rem btn-full-width"
1113
[label]="'project.overview.dialog.deleteComponent.cancelButton' | translate"
1214
severity="info"
13-
(click)="dialogRef.close()"
15+
(onClick)="dialogRef.close()"
1416
[disabled]="isSubmitting()"
1517
/>
1618
<p-button

0 commit comments

Comments
 (0)