fixed issues with downloads , fullscreen and some messages

This commit is contained in:
Timo 2021-05-14 11:48:03 +03:00
parent 571fd775ef
commit 387756614f
4 changed files with 9 additions and 5 deletions

View File

@ -291,6 +291,10 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
@HostListener('window:keyup', ['$event'])
handleKeyEvent($event: KeyboardEvent) {
if (this._router.url.indexOf('/file/') < 0) {
return;
}
if (!ALL_HOTKEY_ARRAY.includes($event.key) || this.dialogRef?.getState() === MatDialogState.OPEN) {
return;
}

View File

@ -1,10 +1,11 @@
import { Component, Input } from '@angular/core';
import { Component, Inject, Input } from '@angular/core';
import { PermissionsService } from '@services/permissions.service';
import { ProjectWrapper } from '@state/model/project.wrapper';
import { FileStatusWrapper } from '@models/file/file-status.wrapper';
import { FileDownloadService } from '@upload-download/services/file-download.service';
import { NotificationService } from '@services/notification.service';
import { TranslateService } from '@ngx-translate/core';
import { BASE_HREF } from '../../../../../tokens';
export type MenuState = 'OPEN' | 'CLOSED';
@ -21,6 +22,7 @@ export class FileDownloadBtnComponent {
@Input() tooltipClass: string;
constructor(
@Inject(BASE_HREF) private readonly _baseHref: string,
private readonly _permissionsService: PermissionsService,
private readonly _fileDownloadService: FileDownloadService,
private readonly _translateService: TranslateService,
@ -38,7 +40,7 @@ export class FileDownloadBtnComponent {
downloadFiles($event: MouseEvent) {
$event.stopPropagation();
this._fileDownloadService.downloadFiles(Array.isArray(this.file) ? this.file : [this.file], this.project).subscribe(() => {
this._notificationService.showToastNotification(this._translateService.instant('download-status.queued'));
this._notificationService.showToastNotification(this._translateService.instant('download-status.queued', { baseUrl: this._baseHref }));
});
}
}

View File

@ -275,7 +275,6 @@
"description": "Beschreibung"
},
"header": "Dossierübersicht",
"no-project": "Angefordertes Dossier: {{projectId}} existiert nicht! <a href='/main/projects'>Zurück zur Dossierliste.</a>",
"bulk": {
"delete": "Dokumente löschen",
"assign": "Prüfer zuweisen",

View File

@ -22,7 +22,7 @@
}
},
"download-status": {
"queued": "Your download has been queued, you can see all your requested downloads here: <a href='/main/downloads'>My Downloads <a/>.",
"queued": "Your download has been queued, you can see all your requested downloads here: <a href='{{baseUrl}}/main/downloads'>My Downloads <a/>.",
"error": {
"generic": "Download failed"
},
@ -282,7 +282,6 @@
"description": "Description"
},
"header": "Dossier Overview",
"no-project": "Requested dossier: {{projectId}} does not exist! <a href='/main/projects'>Back to Dossier Listing. <a/>",
"bulk": {
"delete": "Delete Documents",
"assign": "Assign Reviewer",