2019-11-06 13:48:06 +09:00
|
|
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
|
|
import { ucapAnimations } from '../../animations';
|
2019-11-06 16:24:51 +09:00
|
|
|
import { FileEventJson } from '@ucap-webmessenger/protocol-event';
|
2019-11-07 13:48:25 +09:00
|
|
|
import { DeviceType } from '@ucap-webmessenger/core';
|
|
|
|
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
2019-11-06 13:48:06 +09:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'ucap-image-viewer',
|
|
|
|
templateUrl: './image-viewer.component.html',
|
|
|
|
styleUrls: ['./image-viewer.component.scss'],
|
|
|
|
animations: ucapAnimations
|
|
|
|
})
|
|
|
|
export class ImageViewerComponent implements OnInit {
|
2019-11-06 16:24:51 +09:00
|
|
|
@Input()
|
|
|
|
fileInfo: FileEventJson;
|
|
|
|
|
|
|
|
@Input()
|
2019-11-07 13:48:25 +09:00
|
|
|
fileDownloadUrl: string;
|
2019-11-06 16:24:51 +09:00
|
|
|
|
2019-11-06 13:48:06 +09:00
|
|
|
@Output()
|
|
|
|
closed = new EventEmitter<void>();
|
|
|
|
|
2019-11-06 18:19:37 +09:00
|
|
|
@Output()
|
2019-11-07 13:48:25 +09:00
|
|
|
download = new EventEmitter<void>();
|
2019-11-06 16:24:51 +09:00
|
|
|
|
2019-11-07 13:48:25 +09:00
|
|
|
constructor() {}
|
2019-11-06 16:24:51 +09:00
|
|
|
|
2019-11-07 13:48:25 +09:00
|
|
|
ngOnInit() {}
|
2019-11-06 16:24:51 +09:00
|
|
|
|
2019-11-06 18:19:37 +09:00
|
|
|
onClickDownload(): void {
|
2019-11-07 13:48:25 +09:00
|
|
|
this.download.emit();
|
2019-11-06 18:19:37 +09:00
|
|
|
}
|
|
|
|
|
2019-11-06 16:24:51 +09:00
|
|
|
onClickClose(): void {
|
|
|
|
this.closed.emit();
|
|
|
|
}
|
2019-11-06 13:48:06 +09:00
|
|
|
}
|