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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/core/interceptors/error.interceptor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EMPTY, throwError } from 'rxjs';
import { throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';

import { HttpErrorResponse, HttpInterceptorFn } from '@angular/common/http';
Expand Down Expand Up @@ -26,7 +26,7 @@ export const errorInterceptor: HttpInterceptorFn = (req, next) => {
let errorMessage: string;
if (req.context.get(BYPASS_ERROR_INTERCEPTOR)) {
sentry.captureException(error);
return EMPTY;
return throwError(() => error);
}

if (error.error instanceof ErrorEvent) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<div class="flex justify-content-between align-items-center mb-4 column-gap-3">
<div class="flex flex-1 flex-column gap-7 results-count-heading">
@if (collectionSubmissions().length) {
<h3 class="highlight">
{{ collectionSubmissions().length }} {{ 'collections.searchResults.results' | translate }}
</h3>
} @else if (collectionSubmissions().length > 10000) {
<h3 class="highlight">{{ 'collections.searchResults.10000results' | translate }}</h3>
@if (totalSubmissions()) {
<h3 class="highlight">{{ totalSubmissions() }} {{ 'collections.searchResults.results' | translate }}</h3>
} @else {
<h3 class="highlight">{{ 'collections.searchResults.noResults' | translate }}</h3>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class CollectionsMainContentComponent {
isWeb = toSignal(inject(IS_WEB));
selectedSort = select(CollectionsSelectors.getSortBy);
collectionSubmissions = select(CollectionsSelectors.getCollectionSubmissionsSearchResult);
totalSubmissions = select(CollectionsSelectors.getTotalSubmissions);
isCollectionSubmissionsLoading = select(CollectionsSelectors.getCollectionSubmissionsLoading);

isFiltersOpen = signal(false);
Expand Down
32 changes: 9 additions & 23 deletions src/app/shared/components/files-tree/files-tree.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,15 @@
} @else {
<div class="files-table-row" tabindex="0">
<div class="flex gap-2 table-cell" [class.pl-6]="foldersStack.length">
@if (file.kind !== 'folder') {
<div
class="flex align-items-center gap-2 min-w-0 hover:underline py-1"
(click)="openEntry($event, file)"
(keydown.enter)="openEntry($event, file)"
tabindex="0"
>
<i class="fas fa-file blue-icon"></i>
<span class="entry-title">{{ file?.name ?? '' }}</span>
</div>
} @else {
<div
class="flex gap-2 hover:underline py-1"
(click)="openEntry($event, file)"
(keydown.enter)="openEntry($event, file)"
tabindex="0"
>
<i class="fas fa-folder"></i>
<div class="table-cell entry-title">
{{ file?.name ?? '' }}
</div>
</div>
}
<div
class="flex align-items-center gap-2 hover:underline py-1 max-w-full"
(click)="openEntry($event, file)"
(keydown.enter)="openEntry($event, file)"
tabindex="0"
>
<i [class]="file.kind !== 'folder' ? 'fas fa-file blue-icon' : 'fas fa-folder'"></i>
<span class="entry-title">{{ file?.name ?? '' }}</span>
</div>
</div>

<div class="files-table-cell">
Expand Down
7 changes: 6 additions & 1 deletion src/app/shared/services/collections.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import { createDispatchMap } from '@ngxs/store';

import { catchError, forkJoin, map, Observable, of, switchMap } from 'rxjs';

import { HttpContext } from '@angular/common/http';
import { inject, Injectable } from '@angular/core';

import { BYPASS_ERROR_INTERCEPTOR } from '@core/interceptors/error-interceptor.tokens';
import { ENVIRONMENT } from '@core/provider/environment.provider';
import {
CollectionSubmissionReviewAction,
Expand Down Expand Up @@ -212,8 +214,11 @@ export class CollectionsService {
'fields[users]': 'full_name',
};

const context = new HttpContext();
context.set(BYPASS_ERROR_INTERCEPTOR, true);

return this.jsonApiService
.get<ContributorsResponseJsonApi>(contributorsUrl, params)
.get<ContributorsResponseJsonApi>(contributorsUrl, params, context)
.pipe(map((response) => ContributorsMapper.getContributors(response.data)));
}

Expand Down
Loading