From 2fdc1d3f48360a80b5a5e04c555cc1b9299c7846 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 18 Feb 2024 11:29:24 +0100 Subject: [PATCH] Added file not found notification --- .../src/app/download/download.component.html | 25 ++++++++++++++++++- .../src/app/download/download.component.ts | 2 ++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/download/download.component.html b/frontend/src/app/download/download.component.html index ba98c11..35aec59 100644 --- a/frontend/src/app/download/download.component.html +++ b/frontend/src/app/download/download.component.html @@ -50,7 +50,7 @@
Success

Download complete!

-

File {{ fileName }} has been downloaded and saved to your drive.

+

File {{ fileName }} has been downloaded and saved to your drive.

The download took {{ downloadDuration }} seconds.

+ + + + + + diff --git a/frontend/src/app/download/download.component.ts b/frontend/src/app/download/download.component.ts index e70eb89..8d889a5 100644 --- a/frontend/src/app/download/download.component.ts +++ b/frontend/src/app/download/download.component.ts @@ -22,6 +22,7 @@ import {RouterLink} from "@angular/router"; export class DownloadComponent { @ViewChild('download_not_possible') download_not_possible: ElementRef | undefined; + @ViewChild('file_not_found_modal') file_not_found_modal: ElementRef | undefined; inputFileId: string = "2402183"; fileId: string = ""; @@ -114,6 +115,7 @@ export class DownloadComponent { this.processDownloadInfo(); }) .catch(error => { + this.file_not_found_modal?.nativeElement.showModal(); console.error('Error during download info request:', error); }); }