();
@Output()
openChat = new EventEmitter
();
@Output()
@@ -86,6 +88,10 @@ export class ProfileComponent implements OnInit {
ngOnInit() {}
+ onClickProfileImageView() {
+ this.profileImageView.emit();
+ }
+
onClickOpenChat() {
this.openChat.emit(this.userInfo);
}
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html
index caced57b..48e45703 100644
--- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html
+++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html
@@ -13,6 +13,8 @@
*ngSwitchCase="FileViewerType.Image"
[fileInfo]="fileInfo"
[fileDownloadUrl]="fileDownloadUrl"
+ [imageOnly]="imageOnly"
+ [imageOnlyData]="imageOnlyData"
(download)="onDownload($event)"
(closed)="onClosedViewer()"
>
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts
index adfc1065..2bcab9b6 100644
--- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts
+++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts
@@ -4,6 +4,7 @@ import { FileEventJson } from '@ucap-webmessenger/protocol-event';
import { FileViewerType } from '../types/file-viewer.type';
import { FileType } from '@ucap-webmessenger/protocol-file';
import { FileDownloadItem } from '@ucap-webmessenger/api';
+import { ImageOnlyDataInfo } from '../models/image-only-data-info';
@Component({
selector: 'ucap-file-viewer',
@@ -18,6 +19,11 @@ export class FileViewerComponent implements OnInit {
@Input()
fileDownloadUrl: string;
+ @Input()
+ imageOnly = false;
+ @Input()
+ imageOnlyData?: ImageOnlyDataInfo;
+
@Output()
download = new EventEmitter();
@@ -31,6 +37,10 @@ export class FileViewerComponent implements OnInit {
ngOnInit() {}
detectFileViewerType(fileInfo: FileEventJson): FileViewerType {
+ if (!!this.imageOnly) {
+ return FileViewerType.Image;
+ }
+
switch (fileInfo.fileType) {
case FileType.Image:
return FileViewerType.Image;
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 2bc39a23..e9124ace 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
@@ -17,10 +17,21 @@
- {{ fileInfo.fileName }}
+
+
+
+ {{ imageOnlyData.fileName }}
+
+
+ {{ fileInfo.fileName }}
+
+