From e0c1e181f7990f733b16ff0e5170d4569c7133d1 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 26 Nov 2019 17:54:37 +0900 Subject: [PATCH] =?UTF-8?q?=EC=AA=BD=EC=A7=80=20=EB=AF=B8=EB=A6=AC?= =?UTF-8?q?=EB=B3=B4=EA=B8=B0=20=EC=A4=91=EA=B0=84=20=EC=A0=81=EC=9A=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/apis/detail.ts | 76 ++++++---- .../src/lib/models/detail-content.ts | 21 +++ .../src/lib/models/detail-receiver.ts | 7 + .../src/lib/models/message-list.ts | 7 + .../src/lib/services/message-api.service.ts | 58 +++++-- .../src/public-api.ts | 2 + .../components/left-side.component.html | 12 +- .../components/left-side.component.ts | 43 +++++- .../left-sidenav/message.component.html | 29 +++- .../left-sidenav/message.component.scss | 4 + .../left-sidenav/message.component.ts | 67 +++++++-- .../app/layouts/messenger/dialogs/index.ts | 2 + .../messenger/dialogs/message/index.ts | 3 + .../message-detail.dialog.component.html | 82 ++++++++++ .../message-detail.dialog.component.scss | 18 +++ .../message-detail.dialog.component.spec.ts | 24 +++ .../message-detail.dialog.component.ts | 142 ++++++++++++++++++ .../components/main.page.component.ts | 2 +- .../message-box/attach-file.component.html | 4 +- .../message-box/video.component.html | 4 +- 20 files changed, 544 insertions(+), 63 deletions(-) create mode 100644 projects/ucap-webmessenger-api-message/src/lib/models/detail-content.ts create mode 100644 projects/ucap-webmessenger-api-message/src/lib/models/detail-receiver.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.spec.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts diff --git a/projects/ucap-webmessenger-api-message/src/lib/apis/detail.ts b/projects/ucap-webmessenger-api-message/src/lib/apis/detail.ts index 4bc7fe4c..be42e09a 100644 --- a/projects/ucap-webmessenger-api-message/src/lib/apis/detail.ts +++ b/projects/ucap-webmessenger-api-message/src/lib/apis/detail.ts @@ -6,7 +6,9 @@ import { } from '@ucap-webmessenger/api'; import { DeviceType } from '@ucap-webmessenger/core'; import { MessageType } from '../types/message.type'; -import { CategoryType } from '../types/category.type'; +import { MessageDetailInfo } from '../models/message-list'; +import { DetailContent } from '../models/detail-content'; +import { DetailReceiver } from '../models/detail-receiver'; export interface DetailRequest extends APIRequest { userSeq: number; @@ -18,32 +20,11 @@ export interface DetailRequest extends APIRequest { } export interface DetailResponse extends MessageAPIResponse { - msgInfo: { - msgId: number; - category: CategoryType; - title: string; - titleYn: boolean; - }; + msgInfo: MessageDetailInfo; - content: { - type: MessageType; - sendUserSeq: number; - sendUserName: string; - reservationTime: string | null; - sendYn: boolean; - regDate: string; - attachmentYn: boolean; - smsYn: boolean; - fileAllow: string; - }[]; + contents: DetailContent[]; - recvList: { - userSeq: number; - userName: string; - cancelYn: boolean; - readDate: string; - readYn: boolean; - }[]; + recvList: DetailReceiver[]; } export const encodeDetail: APIJsonEncoder = ( @@ -53,15 +34,50 @@ export const encodeDetail: APIJsonEncoder = ( }; export const decodeDetail: APIDecoder = (res: any) => { + let msgInfo: MessageDetailInfo = null; + const contents: DetailContent[] = []; + const recvList: DetailReceiver[] = []; + if (!!res.msgInfo) { + // msgInfo + msgInfo = { + ...res.msgInfo, + + titleYn: res.msgInfo.titleYn === 'Y' ? true : false, + attachmentYn: res.msgInfo.attachmentYn === 'Y' ? true : false, + smsYn: res.msgInfo.smsYn === 'Y' ? true : false + }; + + // contents + if (!!res.msgInfo.content && res.msgInfo.content.length > 0) { + for (const content of res.msgInfo.content) { + contents.push({ + ...content, + + activeYn: content.activeYn === 'Y' ? true : false + }); + } + } + + // receiver + if (!!res.recvList && res.recvList.length > 0) { + for (const recv of res.recvList) { + recvList.push({ + ...recv, + + cancelYn: recv.cancelYn === 'Y' ? true : false, + readYn: recv.readYn === 'Y' ? true : false + }); + } + } + } + return { responseCode: res.responseCode, responseMsg: res.responseMsg, - msgInfo: null, - - content: [], - - recvList: [] + msgInfo, + contents, + recvList } as DetailResponse; }; diff --git a/projects/ucap-webmessenger-api-message/src/lib/models/detail-content.ts b/projects/ucap-webmessenger-api-message/src/lib/models/detail-content.ts new file mode 100644 index 00000000..1fc4f3d7 --- /dev/null +++ b/projects/ucap-webmessenger-api-message/src/lib/models/detail-content.ts @@ -0,0 +1,21 @@ +import { ContentType } from '../types/content.type'; + +export interface DetailContent { + // text default + activeYn: boolean; + resSeq: number; + resUrl: string; + resContent: string; + resType: ContentType; + resSize: number; + + // attach file default + companyCode?: string; + synapKey?: string; + + // image default + resResolution?: string; + thumbnailNm?: string; + thumbnailSeq?: number; + thumbnailUrl?: string; +} diff --git a/projects/ucap-webmessenger-api-message/src/lib/models/detail-receiver.ts b/projects/ucap-webmessenger-api-message/src/lib/models/detail-receiver.ts new file mode 100644 index 00000000..2752cb3e --- /dev/null +++ b/projects/ucap-webmessenger-api-message/src/lib/models/detail-receiver.ts @@ -0,0 +1,7 @@ +export interface DetailReceiver { + userSeq: number; + userName: string; + cancelYn: boolean; + readDate: string; + readYn: boolean; +} diff --git a/projects/ucap-webmessenger-api-message/src/lib/models/message-list.ts b/projects/ucap-webmessenger-api-message/src/lib/models/message-list.ts index af830491..758bf72e 100644 --- a/projects/ucap-webmessenger-api-message/src/lib/models/message-list.ts +++ b/projects/ucap-webmessenger-api-message/src/lib/models/message-list.ts @@ -32,3 +32,10 @@ export interface MessageList { /** 읽음여부 */ readYn?: boolean; } + +export interface MessageDetailInfo extends MessageList { + sendUserSeq: number; + sendUserName: string; + smsYn?: boolean; + fileAllow?: string; +} diff --git a/projects/ucap-webmessenger-api-message/src/lib/services/message-api.service.ts b/projects/ucap-webmessenger-api-message/src/lib/services/message-api.service.ts index 3fc223d7..874d0742 100644 --- a/projects/ucap-webmessenger-api-message/src/lib/services/message-api.service.ts +++ b/projects/ucap-webmessenger-api-message/src/lib/services/message-api.service.ts @@ -1,8 +1,13 @@ import { Injectable, Inject } from '@angular/core'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { + HttpClient, + HttpHeaders, + HttpRequest, + HttpResponse +} from '@angular/common/http'; import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { map, filter } from 'rxjs/operators'; import { _MODULE_CONFIG } from '../config/token'; import { ModuleConfig } from '../config/module-config'; @@ -203,16 +208,47 @@ export class MessageApiService { } public retrieveResourceFile( req: RetrieveResourceFileRequest - ): Observable { - return this.httpClient - .post( - this.urls.retrieveResourceFile, - encodeRetrieveResourceFile(req), - { - headers: this.headers + ): Observable { + const httpReq = new HttpRequest( + 'POST', + this.urls.retrieveResourceFile, + encodeRetrieveResourceFile(req), + { + headers: this.headers, + responseType: 'blob' + } + ); + return this.httpClient.request(httpReq).pipe( + filter(event => { + if (event instanceof HttpResponse) { + return true; } - ) - .pipe(map(res => decodeRetrieveResourceFile(res))); + return false; + }), + map((event: HttpResponse) => { + return event.body; + }) + ); + // return this.httpClient + // .post( + // this.urls.retrieveResourceFile, + // encodeRetrieveResourceFile(req), + // { + // headers: this.headers + // } + // ) + // .pipe(map(res => decodeRetrieveResourceFile(res))); + } + public urlForFileMessageDownload(req: RetrieveResourceFileRequest): string { + const httpReq = new HttpRequest( + 'POST', + this.urls.retrieveResourceFile, + encodeRetrieveResourceFile(req), + { + headers: this.headers + } + ); + return httpReq.urlWithParams; } /** del */ diff --git a/projects/ucap-webmessenger-api-message/src/public-api.ts b/projects/ucap-webmessenger-api-message/src/public-api.ts index 22b313e7..13789a8a 100644 --- a/projects/ucap-webmessenger-api-message/src/public-api.ts +++ b/projects/ucap-webmessenger-api-message/src/public-api.ts @@ -13,6 +13,8 @@ export * from './lib/services/message-api.service'; export * from './lib/ucap-message-api.module'; +export * from './lib/models/detail-receiver'; +export * from './lib/models/detail-content'; export * from './lib/models/message-list'; export * from './lib/types/category.type'; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html index 266a25f5..d380db62 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html @@ -89,7 +89,16 @@ -
+
, private dialogService: DialogService, private sessionStorageService: SessionStorageService, + private messageApiService: MessageApiService, private logger: NGXLogger ) { this.loginRes = this.sessionStorageService.get( @@ -98,6 +107,12 @@ export class LeftSideComponent implements OnInit, OnDestroy { this.badgeChatUnReadCount = count; }); + this.getMessageUnreadCount(); + this.badgeMessageInterval = setInterval( + () => this.getMessageUnreadCount(), + 5 * 60 * 1000 + ); + this.setFabInitial(MainMenu.Group); this.currentTabLable = MainMenu.Group; } @@ -106,6 +121,13 @@ export class LeftSideComponent implements OnInit, OnDestroy { if (!!this.badgeChatUnReadCountSubscription) { this.badgeChatUnReadCountSubscription.unsubscribe(); } + if (!!this.badgeMessageUnReadCountSubscription) { + this.badgeMessageUnReadCountSubscription.unsubscribe(); + } + + if (!!this.badgeMessageInterval) { + clearInterval(this.badgeMessageInterval); + } this.logger.debug('-----------------------LeftSideComponent ngOnDestroy'); } @@ -314,4 +336,23 @@ export class LeftSideComponent implements OnInit, OnDestroy { break; } } + + getMessageUnreadCount(): void { + this.badgeMessageUnReadCountSubscription = this.messageApiService + .retrieveUnreadCount({ + userSeq: this.loginRes.userSeq, + deviceType: DeviceType.PC, + tokenKey: this.loginRes.tokenString + } as UnreadCountRequest) + .pipe( + map(res => { + if (res.responseCode === MessageStatusCode.Success) { + this.badgeMessageUnReadCount = res.unreadCount; + } else { + } + }), + catchError(error => of(this.logger.error(error))) + ) + .subscribe(); + } } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html index 06034f5c..493c4ec3 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html @@ -50,7 +50,11 @@ 수신 -
+
-
+
-
+
- + 전체 수신 발신 @@ -171,7 +186,11 @@
-
+
( KEY_LOGIN_RES_INFO @@ -210,7 +221,6 @@ export class MessageBoxComponent } as RetrieveSearchRequest) .pipe( map(res => { - console.log(res); if (res.responseCode === MessageStatusCode.Success) { this.currentTotalCount = res.totalCount; this.currentPage = res.pageCount; @@ -219,7 +229,7 @@ export class MessageBoxComponent } else { } }), - catchError(error => of(console.log(error))) + catchError(error => of(this.logger.error(error))) ) .subscribe(); } @@ -244,7 +254,6 @@ export class MessageBoxComponent } as RetrieveRequest) .pipe( map(res => { - console.log(res); if (res.responseCode === MessageStatusCode.Success) { this.currentTotalCount = res.totalCount; this.currentPage = res.pageCount; @@ -253,7 +262,7 @@ export class MessageBoxComponent } else { } }), - catchError(error => of(console.log(error))) + catchError(error => of(this.logger.error(error))) ) .subscribe(); } @@ -271,7 +280,6 @@ export class MessageBoxComponent } as RetrieveRequest) .pipe( map(res => { - console.log(res); if (res.responseCode === MessageStatusCode.Success) { this.currentTotalCount = res.totalCount; this.currentPage = res.pageCount; @@ -280,7 +288,7 @@ export class MessageBoxComponent } else { } }), - catchError(error => of(console.log(error))) + catchError(error => of(this.logger.error(error))) ) .subscribe(); } @@ -298,7 +306,6 @@ export class MessageBoxComponent } as RetrieveRequest) .pipe( map(res => { - console.log(res); if (res.responseCode === MessageStatusCode.Success) { this.currentTotalCount = res.totalCount; this.currentPage = res.pageCount; @@ -307,11 +314,51 @@ export class MessageBoxComponent } else { } }), - catchError(error => of(console.log(error))) + catchError(error => of(this.logger.error(error))) ) .subscribe(); } break; } } + + onClickDetail(message: MessageList) { + this.messageApiService + .detailMessage({ + userSeq: this.loginRes.userSeq, + deviceType: DeviceType.PC, + tokenKey: this.loginRes.tokenString, + type: message.type, + msgId: message.msgId + } as DetailRequest) + .pipe( + map(async res => { + if (res.responseCode === MessageStatusCode.Success) { + // Badge Refresh in case Receive Message.. + if (res.msgInfo.type === MessageType.Receive) { + this.doRefreshUnReadCount.emit(); + } + + // detail view.. + const result = await this.dialogService.open< + MessageDetailDialogComponent, + MessageDetailDialogData, + MessageDetailDialogResult + >(MessageDetailDialogComponent, { + width: '600px', + data: { + detail: res, + loginRes: this.loginRes + } + }); + + // if (!!result && !!result.choice && result.choice) { + // } + } else { + } + }), + catchError(error => of(this.logger.error(error))) + ) + .subscribe(); + } } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts index c692f94f..084b8128 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts @@ -1,11 +1,13 @@ import { DIALOGS as CHAT_DIALOGS } from './chat'; import { DIALOGS as GROUP_DIALOGS } from './group'; +import { DIALOGS as MESSAGE_DIALOGS } from './message'; import { DIALOGS as PROFILE_DIALOGS } from './profile'; import { DIALOGS as SETTINGS_DIALOGS } from './settings'; export const DIALOGS = [ ...CHAT_DIALOGS, ...GROUP_DIALOGS, + ...MESSAGE_DIALOGS, ...PROFILE_DIALOGS, ...SETTINGS_DIALOGS ]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts new file mode 100644 index 00000000..54a371f0 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts @@ -0,0 +1,3 @@ +import { MessageDetailDialogComponent } from './message-detail.dialog.component'; + +export const DIALOGS = [MessageDetailDialogComponent]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html new file mode 100644 index 00000000..1b983152 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html @@ -0,0 +1,82 @@ + + + + + 받은 쪽지 + 보낸 쪽지 + 예약 쪽지 + + + + +
+
+ {{ messageInfo.title }} + + + +
+
+
    +
  • + 보낸사람 + 받는사람 + {{ messageInfo.sendUserName }} +
  • +
  • + 받은시간 + {{ + messageInfo.regDate + | dateToStringFormat: 'YYYY.MM.dd (KS) a/p HH:mm' + }} +
  • +
+
+
+
    +
  • +
    {{
    +              cont.resContent
    +            }}
    + +
  • +
+
+
+
+
+ 기간이 만료된 파일입니다 + +
+ +
    +
  • +
    + + {{ file.resContent }} + {{ file.resSize | ucapBytes }} + +
    +
  • +
+
+
+
+
+ + + +
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss new file mode 100644 index 00000000..25e3cb70 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss @@ -0,0 +1,18 @@ +::ng-deep .mat-card-header-tex { + margin: 0; +} +.confirm-card { + min-width: 500px; + .mat-card-content { + } + .button-farm { + text-align: right; + .mat-primary { + margin-left: 4px; + } + } +} + +::ng-deep .mat-mini-fab .mat-button-wrapper { + padding: 0; +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.spec.ts new file mode 100644 index 00000000..64b19ea4 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MessageDetailDialogComponent } from './message-detail.dialog.component'; + +describe('app::layouts::messenger::MessageDetailDialogComponent', () => { + let component: MessageDetailDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [MessageDetailDialogComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MessageDetailDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts new file mode 100644 index 00000000..22560805 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.ts @@ -0,0 +1,142 @@ +import { Component, OnInit, Inject, ViewChild } from '@angular/core'; +import { + MatDialogRef, + MAT_DIALOG_DATA, + MatSelectionList, + MatSelectionListChange +} from '@angular/material'; +import { Observable, combineLatest, of } from 'rxjs'; +import { Store, select } from '@ngrx/store'; +import { map, catchError, take } from 'rxjs/operators'; + +import * as AppStore from '@app/store'; +import * as SyncStore from '@app/store/messenger/sync'; + +import { + DialogService, + ConfirmDialogComponent, + ConfirmDialogData, + ConfirmDialogResult +} from '@ucap-webmessenger/ui'; +import { GroupDetailData, UserInfo } from '@ucap-webmessenger/protocol-sync'; +import { + DetailResponse, + MessageType, + MessageList, + DetailContent, + DetailReceiver, + ContentType, + MessageDetailInfo, + MessageApiService, + RetrieveResourceFileRequest +} from '@ucap-webmessenger/api-message'; +import { DeviceType } from '@ucap-webmessenger/core'; +import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; +import { NGXLogger } from 'ngx-logger'; + +export interface MessageDetailDialogData { + detail: DetailResponse; + loginRes: LoginResponse; +} + +// tslint:disable-next-line: no-empty-interface +export interface MessageDetailDialogResult {} + +@Component({ + selector: 'app-layout-messenger-message-detail', + templateUrl: './message-detail.dialog.component.html', + styleUrls: ['./message-detail.dialog.component.scss'] +}) +export class MessageDetailDialogComponent implements OnInit { + messageDetail: DetailResponse; + messageInfo: MessageDetailInfo; + contents: DetailContent[] = []; + attachFile: DetailContent[] = []; + receivers: DetailReceiver[] = []; + + isExpiredAttachFile = true; + + MessageType = MessageType; + ContentType = ContentType; + + constructor( + public dialogRef: MatDialogRef< + MessageDetailDialogData, + MessageDetailDialogResult + >, + @Inject(MAT_DIALOG_DATA) public data: MessageDetailDialogData, + private messageApiService: MessageApiService, + private logger: NGXLogger, + private store: Store, + private dialogService: DialogService + ) {} + + ngOnInit(): void { + this.messageDetail = this.data.detail; + this.messageInfo = this.messageDetail.msgInfo; + + if ( + !!this.messageDetail.contents && + this.messageDetail.contents.length > 0 + ) { + this.messageDetail.contents.forEach(cont => { + if (cont.resType !== ContentType.AttachFile) { + this.contents.push(cont); + } else if (cont.resType === ContentType.AttachFile) { + if (cont.activeYn) { + this.isExpiredAttachFile = false; + } + this.attachFile.push(cont); + } + }); + } + + this.receivers = this.messageDetail.recvList; + } + + getThumbImage(content: DetailContent): string { + console.log( + JSON.stringify({ + userSeq: this.data.loginRes.userSeq, + deviceType: DeviceType.PC, + tokenKey: this.data.loginRes.tokenString, + type: this.messageInfo.type, + msgId: this.messageInfo.msgId, + resUrl: content.thumbnailUrl + }) + ); + if (content.resType === ContentType.Image) { + // // return this.messageApiService.urlForFileMessageDownload({ + // // userSeq: this.data.loginRes.userSeq, + // // deviceType: DeviceType.PC, + // // tokenKey: this.data.loginRes.tokenString, + // // type: this.messageInfo.type, + // // msgId: this.messageInfo.msgId, + // // resUrl: content.thumbnailUrl + // // } as RetrieveResourceFileRequest); + // this.messageApiService + // .retrieveResourceFile({ + // userSeq: this.data.loginRes.userSeq, + // deviceType: DeviceType.PC, + // tokenKey: this.data.loginRes.tokenString, + // type: this.messageInfo.type, + // msgId: this.messageInfo.msgId, + // resUrl: content.thumbnailUrl + // } as RetrieveResourceFileRequest) + // .pipe( + // take(1), + // map(async rawBlob => { + // console.log(rawBlob); + // return URL.createObjectURL(rawBlob); + // }) + // ) + // .subscribe(); + } else { + return ''; + } + } + + onClickConfirm(): void { + this.dialogRef.close({}); + } +} diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts index e55d5058..9c625a77 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts @@ -78,7 +78,7 @@ export class MainPageComponent implements OnInit, OnDestroy { this.idleStateChangedSubscription = this.nativeService .idleStateChanged() .subscribe(action => { - console.log(action); + this.logger.debug(action); let statusType: StatusCode; if (action === 'IDLE') { diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html index 0a61718c..0b13d30c 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html @@ -22,10 +22,10 @@
  • - +
  • - +
diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/video.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/video.component.html index fad3ada5..c3b4c8aa 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/video.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/video.component.html @@ -24,10 +24,10 @@
  • - +
  • - +