diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.html b/apps/red-ui/src/app/components/base-screen/base-screen.component.html
index 534a5c4fb..1f7abb691 100644
--- a/apps/red-ui/src/app/components/base-screen/base-screen.component.html
+++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.html
@@ -27,7 +27,6 @@
@@ -36,7 +35,6 @@
diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.ts b/apps/red-ui/src/app/components/base-screen/base-screen.component.ts
index 1771c2bdd..759273a83 100644
--- a/apps/red-ui/src/app/components/base-screen/base-screen.component.ts
+++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.ts
@@ -36,26 +36,22 @@ export class BaseScreenComponent {
routerLink: '/main/account',
show: true,
action: this.appStateService.reset,
- showDot: () => false,
},
{
name: _('top-bar.navigation-items.my-account.children.admin'),
routerLink: '/main/admin',
show: this.currentUser.isManager || this.currentUser.isUserAdmin,
action: this.appStateService.reset,
- showDot: () => false,
},
{
name: _('top-bar.navigation-items.my-account.children.downloads'),
routerLink: '/main/downloads',
show: this.currentUser.isUser,
- showDot: () => this.fileDownloadService.hasPendingDownloads,
},
{
name: _('top-bar.navigation-items.my-account.children.trash'),
routerLink: '/main/admin/trash',
show: this.currentUser.isManager,
- showDot: () => false,
},
];
readonly searchActions: readonly SpotlightSearchAction[] = [
@@ -85,7 +81,6 @@ export class BaseScreenComponent {
readonly userService: UserService,
readonly userPreferenceService: UserPreferenceService,
readonly titleService: Title,
- readonly fileDownloadService: FileDownloadService,
private readonly _router: Router,
private readonly _translateService: TranslateService,
readonly breadcrumbsService: BreadcrumbsService,
diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
index 73cee8af0..2e8cd19ce 100644
--- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
+++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
@@ -11,6 +11,8 @@ import {
} from '@iqser/common-ui';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { RouterHistoryService } from '@services/router-history.service';
+import { interval } from 'rxjs';
+import { switchMap } from 'rxjs/operators';
@Component({
selector: 'redaction-downloads-list-screen',
@@ -43,6 +45,9 @@ export class DownloadsListScreenComponent extends ListingComponent this._loadData()))
+ .subscribe();
}
downloadItem(download: DownloadStatus) {
diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html
index 9e859f0f8..33575b2ea 100644
--- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html
+++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html
@@ -67,7 +67,7 @@
this.permissionsService.canPerformAnnotationActions(file) && viewMode === 'STANDARD'),
@@ -331,6 +318,14 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
}
}
+ handleArrowEvent($event: KeyboardEvent): void {
+ if (['ArrowUp', 'ArrowDown'].includes($event.key)) {
+ if (this.selectedAnnotations.length === 1) {
+ this._workloadComponent.navigateAnnotations($event);
+ }
+ }
+ }
+
@HostListener('window:keyup', ['$event'])
handleKeyEvent($event: KeyboardEvent) {
if (this._router.url.indexOf('/file/') < 0) {
@@ -341,13 +336,6 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
return;
}
- if (['ArrowUp', 'ArrowDown'].includes($event.key)) {
- if (this.selectedAnnotations.length === 1) {
- this._workloadComponent.navigateAnnotations($event);
- }
- return;
- }
-
if (['Escape'].includes($event.key)) {
this.fullScreen = false;
this.closeFullScreen();
@@ -389,6 +377,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
async viewerReady($event: WebViewerInstance) {
this._instance = $event;
this.ready = true;
+
await this._stampPDF();
await this._reloadAnnotations();
this._setExcludedPageStyles();
@@ -410,6 +399,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
} else {
this._loadingService.stop();
}
+ this._changeDetectorRef.markForCheck();
}
async annotationsChangedByReviewAction(annotation: AnnotationWrapper) {
@@ -445,6 +435,19 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
return false;
}
+ private _setActiveViewerPage() {
+ const currentPage = this._instance?.Core.documentViewer?.getCurrentPage();
+ if (!currentPage) {
+ this.activeViewerPage = 1;
+ } else {
+ this.activeViewerPage = this.viewModeService.isCompare
+ ? currentPage % 2 === 0
+ ? currentPage / 2
+ : (currentPage + 1) / 2
+ : currentPage;
+ }
+ }
+
private _setExcludedPageStyles() {
const file = this._filesMapService.get(this.dossierId, this.fileId);
setTimeout(() => {
@@ -469,19 +472,25 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
if (!this._instance) {
return;
}
+
+ const document = this._instance.Core.documentViewer.getDocument();
+ if (!document) {
+ return;
+ }
+
const pdfNet = this._instance.Core.PDFNet;
- const document = await this._instance.Core.documentViewer.getDocument().getPDFDoc();
+ const pdfDoc = await this._instance.Core.documentViewer.getDocument().getPDFDoc();
const file = this._filesMapService.get(this.dossierId, this.fileId);
const allPages = [...Array(file.numberOfPages).keys()].map(page => page + 1);
- await clearStamps(document, pdfNet, allPages);
+ await clearStamps(pdfDoc, pdfNet, allPages);
if (this.viewModeService.viewMode === 'REDACTED') {
const dossier = this._dossiersService.find(this.dossierId);
if (dossier.watermarkPreviewEnabled) {
- await this._stampPreview(document, dossier.dossierTemplateId);
+ await this._stampPreview(pdfDoc, dossier.dossierTemplateId);
}
} else {
- await this._stampExcludedPages(document, file.excludedPages);
+ await this._stampExcludedPages(pdfDoc, file.excludedPages);
}
this._instance.Core.documentViewer.refreshAll();
this._instance.Core.documentViewer.updateView([this.activeViewerPage], this.activeViewerPage);
diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts
index ede23950a..bbc3e3acd 100644
--- a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts
+++ b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts
@@ -16,8 +16,6 @@ import { EntitiesService, List, mapEach, RequiredParam, Validate } from '@iqser/
@Injectable()
export class FileDownloadService extends EntitiesService {
- hasPendingDownloads = false;
-
constructor(
private readonly _userService: UserService,
private readonly _keycloakService: KeycloakService,
@@ -25,13 +23,6 @@ export class FileDownloadService extends EntitiesService user.isUser),
- switchMap(() => this.loadAll()),
- )
- .subscribe();
}
downloadFiles(fileIds: List, dossierId: string): Observable {
@@ -45,7 +36,6 @@ export class FileDownloadService extends EntitiesService new DownloadStatus(entity)),
tap(entities => this.setEntities(entities)),
- tap(() => (this.hasPendingDownloads = !!this.all.find(f => !f.lastDownload && f.isReady))),
);
}
diff --git a/package.json b/package.json
index 311d988d8..3fb6881a0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "redaction",
- "version": "3.140.0",
+ "version": "3.143.0",
"private": true,
"license": "MIT",
"scripts": {
diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz
index ac9d35ffd..e07249f0a 100644
Binary files a/paligo-theme.tar.gz and b/paligo-theme.tar.gz differ