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 e78adbd5..7e05471c 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 @@ -8,7 +8,7 @@ -
+
-
+
-
+
-
-
-
-
- - - - + +
+
+
-
-
- -
-
- - - - - - - -
-
-
+ *ngIf=" + !!fileInfo.eventInfo && + !!fileInfo.eventInfo.sentMessageJson && + !!fileInfo.eventInfo.sentMessageJson.thumbUrl; + then thumb; + else icon + " + >
+ + + + +
+
+
+
+ +
+ + + + + + + +
+ +
+
- +
- - - - Select File. + + + + + Select File.
@@ -27,7 +39,7 @@
    -
  • {{ selectedFile.info.name }}
  • +
  • {{ selectedFile.info.name }}
  • size : {{ selectedFile.info.size | ucapBytes }}
  • date : @@ -36,34 +48,77 @@
- - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -99,7 +154,8 @@
- {{ element.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} ~ 2020.01.23 + {{ element.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} ~ + 2020.01.23
@@ -142,5 +198,5 @@ Open Folder
- + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts index 6074ed4c..c583a335 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts @@ -141,6 +141,11 @@ export class FileBoxComponent implements OnInit, OnDestroy { .sortData(this.dataSource.data, this.sort) .filter((u, i) => i >= this.paginator.pageSize * this.paginator.pageIndex) .filter((u, i) => i < this.paginator.pageSize); + + if (data.length === 0) { + return false; + } + if ( data.filter( dInfo => @@ -207,4 +212,4 @@ export class FileBoxComponent implements OnInit, OnDestroy { onClickRow(row: FileInfoTotal) { this.selectedFile = row; } -} \ No newline at end of file +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts index 8a5bb275..5a0558a1 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts @@ -27,7 +27,8 @@ import { MatTableModule, MatPaginatorModule, MatRippleModule, - MatSortModule + MatSortModule, + MatTooltipModule } from '@angular/material'; import { MatListModule } from '@angular/material/list'; import { MatChipsModule } from '@angular/material/chips'; @@ -80,6 +81,7 @@ import { DIALOGS } from './dialogs'; MatSortModule, MatPaginatorModule, MatRippleModule, + MatTooltipModule, PerfectScrollbarModule, diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts index 6a1a88ed..28a134f3 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts @@ -1,6 +1,6 @@ import { CommonApiService, - MassTalkSaveRequest, + MassTalkSaveRequest } from '@ucap-webmessenger/api-common'; import { KEY_ENVIRONMENTS_INFO } from './../../../types/environment.type'; import { Injectable } from '@angular/core'; @@ -19,7 +19,7 @@ import { catchError, exhaustMap, withLatestFrom, - concatMap, + concatMap } from 'rxjs/operators'; import moment from 'moment'; import { @@ -38,7 +38,7 @@ import { ReadNotification, SSVC_TYPE_EVENT_SEND_RES, SSVC_TYPE_EVENT_SEND_NOTI, - EventJson, + EventJson } from '@ucap-webmessenger/protocol-event'; import * as ChatStore from '@app/store/messenger/chat'; @@ -74,13 +74,13 @@ import { infoIntervalClear, fileInfo, fileInfoSuccess, - fileInfoFailure, + fileInfoFailure } from './actions'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { RoomInfo, RoomProtocolService, - OpenResponse, + OpenResponse } from '@ucap-webmessenger/protocol-room'; import { LoginInfo, KEY_LOGIN_INFO, EnvironmentsInfo } from '@app/types'; import { Dictionary } from '@ngrx/entity'; @@ -99,7 +99,7 @@ import { InfoData as FileInfoData, InfoCheckData as FileInfoCheckData, InfoResponse as FileInfoResponse, - FileType, + FileType } from '@ucap-webmessenger/protocol-file'; @Injectable() @@ -111,7 +111,7 @@ export class Effects { return info({ roomSeq: action.roomSeq, baseSeq: 0, - requestCount: CONST.EVENT_INFO_READ_COUNT, + requestCount: CONST.EVENT_INFO_READ_COUNT }); }) ) @@ -139,14 +139,14 @@ export class Effects { this.store.dispatch( infoSuccess({ infoList, - res: res as InfoResponse, + res: res as InfoResponse }) ); } else { this.store.dispatch( infoMoreSuccess({ infoList, - res: res as InfoResponse, + res: res as InfoResponse }) ); } @@ -161,7 +161,7 @@ export class Effects { this.store.dispatch( read({ roomSeq: req.roomSeq, - lastReadSeq: Number(maxSeq), + lastReadSeq: Number(maxSeq) }) ); @@ -171,8 +171,8 @@ export class Effects { req: { roomSeq: req.roomSeq, // { 파일타입 } cf) I : 이미지 V: 동영상 F: 파일 "" 빈값이면 모든 타입을 내려줌 - type: FileType.All, - }, + type: FileType.All + } }) ); } @@ -217,7 +217,7 @@ export class Effects { fileInfoSuccess({ fileInfoList, fileInfoCheckList, - res: res as FileInfoResponse, + res: res as FileInfoResponse }) ); } @@ -321,7 +321,7 @@ export class Effects { this.store.dispatch( SyncStore.updateUnreadCount({ roomSeq: action.roomSeq, - noReadCnt: 0, + noReadCnt: 0 }) ); } @@ -339,7 +339,7 @@ export class Effects { map((res: SendResponse) => { return sendSuccess({ senderSeq: action.senderSeq, - res, + res }); }), catchError(error => of(sendFailure({ error }))) @@ -360,7 +360,7 @@ export class Effects { roomSeq: res.roomSeq, info: res.info, SVC_TYPE: res.SVC_TYPE, - SSVC_TYPE: res.SSVC_TYPE, + SSVC_TYPE: res.SSVC_TYPE }) ); }) @@ -380,7 +380,7 @@ export class Effects { roomSeq: noti.roomSeq, info: noti.info, SVC_TYPE: noti.SVC_TYPE, - SSVC_TYPE: noti.SSVC_TYPE, + SSVC_TYPE: noti.SSVC_TYPE }) ); }) @@ -404,8 +404,8 @@ export class Effects { req: { roomSeq: action.trgtRoomSeq, eventType: action.req.eventType, - sentMessage: action.req.sentMessage, - }, + sentMessage: action.req.sentMessage + } }) ); } else if (!!action.trgtUserSeqs && action.trgtUserSeqs.length > 0) { @@ -425,7 +425,7 @@ export class Effects { return this.roomProtocolService .open({ divCd: 'forwardOpen', - userSeqs: action.trgtUserSeqs, + userSeqs: action.trgtUserSeqs }) .pipe( map((res: OpenResponse) => { @@ -438,8 +438,8 @@ export class Effects { req: { roomSeq: res.res.roomSeq, eventType: action.req.eventType, - sentMessage: action.req.sentMessage, - }, + sentMessage: action.req.sentMessage + } }) ); return res; @@ -468,7 +468,7 @@ export class Effects { deviceType: environmentsInfo.deviceType, token: loginResInfo.tokenString, content: action.req.sentMessage, - roomSeq: action.req.roomSeq, + roomSeq: action.req.roomSeq }; return this.commonApiService.massTalkSave(req).pipe( @@ -480,8 +480,8 @@ export class Effects { req: { roomSeq: res.roomSeq, eventType: EventType.MassText, - sentMessage: res.returnJson, - }, + sentMessage: res.returnJson + } }) ); } else { @@ -523,7 +523,7 @@ export class Effects { this.store.dispatch( read({ roomSeq: action.roomSeq, - lastReadSeq: action.info.seq, + lastReadSeq: action.info.seq }) ); } @@ -545,13 +545,26 @@ export class Effects { this.store.dispatch( SyncStore.updateUnreadCount({ roomSeq: action.roomSeq, - noReadCnt: noReadCnt + 1, + noReadCnt: noReadCnt + 1 }) ); } } } + if (action.info.type === EventType.File) { + // File 정보 수집. + this.store.dispatch( + fileInfo({ + req: { + roomSeq: action.roomSeq, + // { 파일타입 } cf) I : 이미지 V: 동영상 F: 파일 "" 빈값이면 모든 타입을 내려줌 + type: FileType.All + } + }) + ); + } + // 대화 > 리스트 :: finalEventMessage refresh this.store.dispatch(ChatStore.newEventMessage(action)); }) @@ -598,7 +611,7 @@ export class Effects { SyncStore.refreshRoom({ roomSeq: action.noti.roomSeq, isDetail: true, - localeCode: loginInfo.localeCode, + localeCode: loginInfo.localeCode }) ); }) @@ -645,7 +658,7 @@ export class Effects { SyncStore.refreshRoom({ roomSeq: noti.roomSeq, isDetail: true, - localeCode: loginInfo.localeCode, + localeCode: loginInfo.localeCode }) ); })