From b247f859179847023fe882791d402546dead5cfa Mon Sep 17 00:00:00 2001 From: mdelez <60604010+mdelez@users.noreply.github.com> Date: Fri, 19 Aug 2022 09:16:36 +0200 Subject: [PATCH] chore(file-representation): add credentials to all file download requests (#803) --- .../archive/archive.component.ts | 2 +- .../representation/audio/audio.component.html | 4 +- .../representation/audio/audio.component.ts | 2 +- .../document/document.component.ts | 2 +- .../still-image/still-image.component.html | 4 +- .../still-image/still-image.component.ts | 2 +- .../representation/text/text.component.ts | 2 +- .../representation/video/video.component.html | 66 +++++++++---------- .../representation/video/video.component.scss | 7 ++ .../representation/video/video.component.ts | 2 +- 10 files changed, 49 insertions(+), 44 deletions(-) diff --git a/src/app/workspace/resource/representation/archive/archive.component.ts b/src/app/workspace/resource/representation/archive/archive.component.ts index e8c831995f..4c9ad0f0c3 100644 --- a/src/app/workspace/resource/representation/archive/archive.component.ts +++ b/src/app/workspace/resource/representation/archive/archive.component.ts @@ -58,7 +58,7 @@ export class ArchiveComponent implements OnInit, AfterViewInit { // https://stackoverflow.com/questions/66986983/angular-10-download-file-from-firebase-link-without-opening-into-new-tab async downloadArchive(url: string) { try { - const res = await this._http.get(url, { responseType: 'blob' }).toPromise(); + const res = await this._http.get(url, { responseType: 'blob', withCredentials: true }).toPromise(); this.downloadFile(res); } catch (e) { this._errorHandler.showMessage(e); diff --git a/src/app/workspace/resource/representation/audio/audio.component.html b/src/app/workspace/resource/representation/audio/audio.component.html index d7b85a43fc..d957d1b1d1 100644 --- a/src/app/workspace/resource/representation/audio/audio.component.html +++ b/src/app/workspace/resource/representation/audio/audio.component.html @@ -28,10 +28,10 @@ - - - - - @@ -69,9 +67,9 @@ matTooltip="Stop and go to start" [matTooltipPosition]="matTooltipPos"> skip_previous - @@ -84,13 +82,13 @@ / {{ duration | appTime }}

- - - - - - - + + + + + + + @@ -102,4 +100,4 @@ - + \ No newline at end of file diff --git a/src/app/workspace/resource/representation/video/video.component.scss b/src/app/workspace/resource/representation/video/video.component.scss index 39a67b7019..c7b6585326 100644 --- a/src/app/workspace/resource/representation/video/video.component.scss +++ b/src/app/workspace/resource/representation/video/video.component.scss @@ -156,3 +156,10 @@ } +::ng-deep .mat-menu-custom-black { + background: #292929; + .menu-content { + color: #FFFFFF; + } +} + diff --git a/src/app/workspace/resource/representation/video/video.component.ts b/src/app/workspace/resource/representation/video/video.component.ts index c4049972fa..accb43f040 100644 --- a/src/app/workspace/resource/representation/video/video.component.ts +++ b/src/app/workspace/resource/representation/video/video.component.ts @@ -307,7 +307,7 @@ export class VideoComponent implements OnInit, AfterViewInit { async downloadVideo(url: string) { try { - const res = await this._http.get(url, { responseType: 'blob' }).toPromise(); + const res = await this._http.get(url, { responseType: 'blob', withCredentials: true }).toPromise(); this.downloadFile(res); } catch (e) { this._errorHandler.showMessage(e);