();
+ download = new EventEmitter();
@Output()
closed = new EventEmitter();
+ fileDownloadItem: FileDownloadItem;
+
constructor() {}
ngOnInit() {}
onClickDownload(): void {
- this.download.emit();
+ this.fileDownloadItem = new FileDownloadItem();
+ this.download.emit(this.fileDownloadItem);
}
onClickClose(): void {
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.html
index 0f1561d1..b9df4234 100644
--- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.html
+++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.html
@@ -15,4 +15,9 @@
>delete
+
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.ts
index 2b411d6a..eefa6939 100644
--- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.ts
+++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/document-viewer.component.ts
@@ -2,12 +2,13 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { ucapAnimations } from '../../animations';
import { FileEventJson } from '@ucap-webmessenger/protocol-event';
import { DeviceType } from '@ucap-webmessenger/core';
+import { FileDownloadItem } from '@ucap-webmessenger/api-common';
@Component({
selector: 'ucap-document-viewer',
templateUrl: './document-viewer.component.html',
styleUrls: ['./document-viewer.component.scss'],
- animations: ucapAnimations
+ animations: ucapAnimations,
})
export class DocumentViewerComponent implements OnInit {
@Input()
@@ -17,16 +18,21 @@ export class DocumentViewerComponent implements OnInit {
fileDownloadUrl: string;
@Output()
- download = new EventEmitter
();
+ download = new EventEmitter();
@Output()
closed = new EventEmitter();
+ fileDownloadItem: FileDownloadItem;
+
constructor() {}
ngOnInit() {}
- onClickDownload(): void {}
+ onClickDownload(): void {
+ this.fileDownloadItem = new FileDownloadItem();
+ this.download.emit(this.fileDownloadItem);
+ }
onClickClose(): void {
this.closed.emit();
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html
index 262a90e7..343a55d6 100644
--- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html
+++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html
@@ -1,11 +1,22 @@
-