Skip to content

Commit 92e7cb2

Browse files
committed
merge feature/pbs-25.02 to resolve conflict
2 parents 1e4385a + 3a49725 commit 92e7cb2

File tree

35 files changed

+492
-294
lines changed

35 files changed

+492
-294
lines changed

src/app/features/collections/components/collections-discover/collections-discover.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
>
66
<div class="flex gap-3">
77
@let provider = collectionProvider();
8-
@if (provider && provider.brand) {
9-
<img class="collections-logo" alt="Collections Logo" height="64" [src]="provider.brand.heroLogoImageUrl" />
8+
9+
@if (provider && provider.assets) {
10+
<img
11+
class="collections-logo"
12+
alt="Collections Logo"
13+
height="80"
14+
[src]="provider.assets.squareColorNoTransparent"
15+
/>
1016
}
1117

1218
<h1 class="collections-heading flex align-items-center">{{ collectionProvider()?.name }}</h1>

src/app/features/files/components/move-file-dialog/move-file-dialog.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ export class MoveFileDialogComponent {
182182
}
183183

184184
this.isFilesUpdating.set(true);
185+
const headerKey = this.isMoveAction ? 'files.dialogs.moveFile.movingHeader' : 'files.dialogs.moveFile.copingHeader';
186+
this.config.header = this.translateService.instant(headerKey);
185187
const action = this.config.data.action;
186188
const files: FileModel[] = this.config.data.files;
187189
const totalFiles = files.length;
@@ -209,6 +211,7 @@ export class MoveFileDialogComponent {
209211
this.openReplaceMoveDialog(conflictFiles, path, action);
210212
} else {
211213
this.showToast(action);
214+
this.config.header = this.translateService.instant('files.dialogs.moveFile.title');
212215
this.completeMove();
213216
}
214217
}

src/app/features/institutions/pages/institutions-list/institutions-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@for (institution of institutions(); track $index) {
1919
<a class="dark-blue-link" [routerLink]="[institution.id]">
2020
<div class="border-1 border-round-xl grey-border-color px-5 py-4 flex align-items-center gap-4">
21-
<img class="fit-contain" [ngSrc]="institution.assets.logo" [alt]="'Logo'" width="60" height="60" />
21+
<img class="fit-contain" [ngSrc]="institution.assets.logo" [alt]="'Logo'" width="80" height="80" />
2222

2323
<h2>{{ institution.name }}</h2>
2424
</div>

src/app/features/institutions/pages/institutions-search/institutions-search.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<img
1010
[ngSrc]="institution().assets.logo"
1111
[alt]="institution().name"
12-
width="60"
13-
height="60"
12+
width="80"
13+
height="80"
1414
class="fit-contain"
1515
/>
1616

src/app/features/moderation/store/preprint-moderation/preprint-moderation.state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class PreprintModerationState {
182182
);
183183

184184
return this.contributorsService
185-
.getAllContributors(ResourceType.Preprint, preprintId, 1, DEFAULT_TABLE_PARAMS.rows)
185+
.getBibliographicContributors(ResourceType.Preprint, preprintId, 1, DEFAULT_TABLE_PARAMS.rows)
186186
.pipe(
187187
tap((res) => {
188188
ctx.setState(
@@ -241,7 +241,7 @@ export class PreprintModerationState {
241241
);
242242

243243
return this.contributorsService
244-
.getAllContributors(ResourceType.Preprint, preprintId, 1, DEFAULT_TABLE_PARAMS.rows)
244+
.getBibliographicContributors(ResourceType.Preprint, preprintId, 1, DEFAULT_TABLE_PARAMS.rows)
245245
.pipe(
246246
tap((res) => {
247247
ctx.setState(

src/app/features/preprints/components/preprint-details/preprint-make-decision/preprint-make-decision.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ <h4 class="line-height-3">{{ 'preprints.details.decision.decline.label' | transl
4949
</section>
5050

5151
<section class="w-full">
52-
<label for="withdrawalJustification">{{ labelRequestDecisionJustification() | translate }}</label>
52+
<div class="flex justify-content-between align-items-center gap-4">
53+
<label for="withdrawalJustification">{{ labelRequestDecisionJustification() | translate }}</label>
54+
<p>{{ reviewerComment()?.length ?? 0 }}/{{ decisionCommentLimit }}</p>
55+
</div>
56+
5357
<textarea
5458
pTextarea
5559
id="withdrawalJustification"
@@ -110,10 +114,12 @@ <h4 class="line-height-3">{{ rejectOptionLabel() | translate }}</h4>
110114
</section>
111115

112116
<section class="w-full mt-4">
117+
<p class="flex justify-content-end">{{ reviewerComment()?.length ?? 0 }}/{{ decisionCommentLimit }}</p>
118+
113119
<textarea
114120
pTextarea
115121
id="comment"
116-
class="w-full"
122+
class="w-full mt-1"
117123
[placeholder]="'preprints.details.decision.commentPlaceholder' | translate"
118124
[rows]="4"
119125
[(ngModel)]="reviewerComment"

src/app/features/preprints/components/preprint-provider-hero/preprint-provider-hero.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
<p-skeleton width="3rem" height="1.5rem" />
66
<p-skeleton width="12rem" height="1.5rem" />
77
} @else {
8-
<img alt="Provider Logo" height="40" [src]="preprintProvider()!.brand.heroLogoImageUrl" />
8+
<img
9+
height="80"
10+
[src]="preprintProvider()!.brand.heroLogoImageUrl"
11+
[alt]="'preprints.selectService.providerLogoImageAlt' | translate"
12+
/>
913
<h1 class="preprint-provider-name">{{ preprintProvider()!.name }}</h1>
1014
}
1115
</div>
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
<p-card>
2-
<div>
3-
<h2>{{ 'preprints.preprintStepper.metadata.affiliatedInstitutionsTitle' | translate }}</h2>
4-
<p
5-
class="mt-3"
6-
[innerHTML]="
7-
'preprints.preprintStepper.metadata.affiliatedInstitutionsDescription'
8-
| translate: { preprintWord: provider()?.preprintWord }
9-
"
10-
></p>
11-
12-
<div class="mt-4">
13-
<osf-affiliated-institution-select
14-
[institutions]="userInstitutions()"
15-
[isLoading]="
16-
areUserInstitutionsLoading() || areResourceInstitutionsLoading() || areResourceInstitutionsSubmitting()
1+
@if (userInstitutions().length) {
2+
<p-card>
3+
<div>
4+
<h2>{{ 'preprints.preprintStepper.metadata.affiliatedInstitutionsTitle' | translate }}</h2>
5+
<p
6+
class="mt-3"
7+
[innerHTML]="
8+
'preprints.preprintStepper.metadata.affiliatedInstitutionsDescription'
9+
| translate: { preprintWord: provider()?.preprintWord }
1710
"
18-
[selectedInstitutions]="selectedInstitutions()"
19-
(selectedInstitutionsChange)="onInstitutionsChange($event)"
20-
/>
11+
></p>
12+
13+
<div class="mt-4">
14+
<osf-affiliated-institution-select
15+
[institutions]="userInstitutions()"
16+
[isLoading]="
17+
areUserInstitutionsLoading() || areResourceInstitutionsLoading() || areResourceInstitutionsSubmitting()
18+
"
19+
[selectedInstitutions]="selectedInstitutions()"
20+
(selectedInstitutionsChange)="onInstitutionsChange($event)"
21+
/>
22+
</div>
2123
</div>
22-
</div>
23-
</p-card>
24+
</p-card>
25+
}

src/app/features/preprints/components/stepper/review-step/review-step.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
FetchPreprintProject,
2121
PreprintStepperSelectors,
2222
SubmitPreprint,
23+
UpdatePreprint,
2324
UpdatePrimaryFileRelationship,
2425
} from '@osf/features/preprints/store/preprint-stepper';
2526
import {
@@ -66,6 +67,7 @@ export class ReviewStepComponent implements OnInit {
6667
submitPreprint: SubmitPreprint,
6768
fetchResourceInstitutions: FetchResourceInstitutions,
6869
updatePrimaryFileRelationship: UpdatePrimaryFileRelationship,
70+
updatePreprint: UpdatePreprint,
6971
});
7072

7173
provider = input.required<PreprintProviderDetails | undefined>();
@@ -101,6 +103,10 @@ export class ReviewStepComponent implements OnInit {
101103
.updatePrimaryFileRelationship(preprintFile?.id ?? preprint.primaryFileId)
102104
.pipe(
103105
switchMap(() => {
106+
if (!this.provider()?.reviewsWorkflow) {
107+
return this.actions.updatePreprint(preprint.id, { isPublished: true });
108+
}
109+
104110
if (preprint.reviewsState !== ReviewsState.Accepted) {
105111
return this.actions.submitPreprint();
106112
}

src/app/features/preprints/pages/create-new-version/create-new-version.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ export class CreateNewVersionComponent implements OnInit, OnDestroy, CanDeactiva
8585
});
8686
}
8787

88+
@HostListener('window:beforeunload', ['$event'])
89+
onBeforeUnload($event: BeforeUnloadEvent): boolean {
90+
$event.preventDefault();
91+
return false;
92+
}
93+
8894
ngOnInit() {
8995
this.actions.getPreprintProviderById(this.providerId());
9096
this.actions.fetchPreprint(this.preprintId());
@@ -118,10 +124,4 @@ export class CreateNewVersionComponent implements OnInit, OnDestroy, CanDeactiva
118124
const id = this.preprintId().split('_')[0];
119125
this.router.navigate([id]);
120126
}
121-
122-
@HostListener('window:beforeunload', ['$event'])
123-
public onBeforeUnload($event: BeforeUnloadEvent): boolean {
124-
$event.preventDefault();
125-
return false;
126-
}
127127
}

0 commit comments

Comments
 (0)