Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<p-message styleClass="w-full" severity="warn">
<ng-template #container>
<osf-icon class="pt-1" [iconClass]="'fas fa-triangle-exclamation'" />
<div class="banner-container w-full flex flex-row gap-2 align-items-start font-bold text-base">
{{ 'preprints.details.warningBanner' | translate }}
</div>
</ng-template>
</p-message>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { TranslatePipe } from '@ngx-translate/core';

import { Message } from 'primeng/message';

import { ChangeDetectionStrategy, Component } from '@angular/core';

import { IconComponent } from '@shared/components';

@Component({
selector: 'osf-preprint-warning-banner',
imports: [TranslatePipe, Message, IconComponent],
templateUrl: './osf-preprint-warning-banner.component.html',
styleUrl: './osf-preprint-warning-banner.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class OsfPreprintWarningBannerComponent {
//
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ <h1>{{ preprint()!.title }}</h1>
</section>

<section class="flex-1 flex flex-column gap-2 bg-white py-2 px-3 md:px-4">
@if (isOsfPreprint()) {
<osf-preprint-warning-banner />
}
@if (moderationStatusBannerVisible()) {
<osf-moderation-status-banner
[provider]="preprintProvider()!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { IS_MEDIUM, pathJoin } from '@osf/shared/helpers';
import { ReviewPermissions, UserPermissions } from '@shared/enums';
import { MetaTagsService } from '@shared/services';
import { ContributorsSelectors } from '@shared/stores';
import { OsfPreprintWarningBannerComponent } from '../../components/preprint-details/osf-preprint-warning-banner/osf-preprint-warning-banner.component';

import { environment } from 'src/environments/environment';

Expand All @@ -64,6 +65,7 @@ import { environment } from 'src/environments/environment';
StatusBannerComponent,
TranslatePipe,
PreprintTombstoneComponent,
OsfPreprintWarningBannerComponent,
ModerationStatusBannerComponent,
MakeDecisionComponent,
],
Expand Down Expand Up @@ -235,6 +237,10 @@ export class PreprintDetailsComponent implements OnInit, OnDestroy {
);
});

isOsfPreprint = computed(() => {
return this.providerId() === 'osf';
};

moderationStatusBannerVisible = computed(() => {
return (
this.moderationMode() &&
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,7 @@
"moderatorFeedback": "Moderator Feedback",
"showModeratorFeedback": "Show moderator feedback"
},
"warningBanner": "OSF preprints are not peer reviewed and acceptance into OSF preprints is not an indicator of scholarly merit.",
"withdrawDialog": {
"title": "Withdraw {{preprintWord}}",
"withdrawalExplanation": "You are about to withdraw this version of your {{singularPreprintWord}}. Withdrawing a version will remove it from public view but will not affect other versions of this {{singularPreprintWord}}, if available.",
Expand Down