diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.html index a347014d..bf350c3a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.html @@ -1,26 +1,28 @@
- diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.scss index a26022db..47a233fd 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/intro.component.scss @@ -3,21 +3,29 @@ height: 100%; flex: 1; - .big-circle { - border-radius: 50%; - width: 240px; - height: 240px; - line-height: 240px; - text-align: center; - border: 1px solid; - } + .empty-logo { + flex-flow: column; + transform: translateY(-100px); + .big-circle { + border-radius: 50%; + width: 200px; + height: 200px; + display: flex; + justify-content: center; + justify-items: center; + } - .app-title { - font-weight: 600; - font-size: 32px; - } + .app-title { + margin-top: 1.4em; + font-weight: 600; + font-size: 2.6em; + } - .secondary-text { - font-size: 16px; + .secondary-text { + margin-top: 1.4em; + font-size: 1.2em; + font-weight: 500; + color: #666666; + } } } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts index 5a42c843..14c2031e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts @@ -128,7 +128,6 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked { .pipe( tap(([room, roomUser, roomUserShort]) => { this.roomList = room; - this.searchRoomList = room; this.roomUserList = roomUser; this.roomUserShortList = roomUserShort; @@ -159,6 +158,15 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked { this.recommendedWordList = [...recommendedWordList]; + if (!!this.isSearch) { + this.searchRoomList = room.filter( + roomInfo => + this.searchRoomList.filter( + sInfo => sInfo.roomSeq === roomInfo.roomSeq + ).length > 0 + ); + } + if (!!this.psDirectiveRef) { this.psDirectiveRef.update(); } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts index 9d7d6b7e..4d1f5bea 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts @@ -105,6 +105,8 @@ export class GroupComponent implements OnInit, OnDestroy { groupBuddyListSubscription: Subscription; favoritBuddyList$: Observable; + favoritBuddyList: UserInfo[] = []; + companyList$: Observable; companyCode: string; @@ -229,9 +231,10 @@ export class GroupComponent implements OnInit, OnDestroy { .pipe(select(AppStore.MessengerSelector.SyncSelector.selectAllBuddy2)) .pipe( map(buddyInfoList => { - return buddyInfoList + this.favoritBuddyList = buddyInfoList .filter(buddy => buddy.isFavorit) .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0)); + return this.favoritBuddyList; }) ); } @@ -371,7 +374,11 @@ export class GroupComponent implements OnInit, OnDestroy { menuType === 'EDIT_MEMBER' || menuType === 'DELETE' ) { - if (!group || group === undefined) { + if ( + !group || + group === undefined || + (group.seq < 0 && group.name === 'Favorit') + ) { return false; } @@ -395,7 +402,11 @@ export class GroupComponent implements OnInit, OnDestroy { } // 그룹원 0명인 그룹 메뉴 정리 - if (menuType === 'CHAT') { + if ( + menuType === 'CHAT' || + menuType === 'SEND_MESSAGE' || + menuType === 'DIV1' + ) { if (!!group && !!group.userSeqs && group.userSeqs.length > 0) { return true; } else { @@ -652,11 +663,22 @@ export class GroupComponent implements OnInit, OnDestroy { break; case 'SEND_MESSAGE': { - const curGroupBuddyList = this.groupBuddyList.filter( - groupInfo => groupInfo.group.seq === group.seq - ); + let receiverList: UserInfo[] = []; + const isFavGroup = + group.seq < 0 && group.name === 'Favorit' ? true : false; - if (!!curGroupBuddyList && curGroupBuddyList.length > 0) { + if (!!isFavGroup) { + receiverList = this.favoritBuddyList; + } else { + const curGroupBuddyList = this.groupBuddyList.filter( + groupInfo => groupInfo.group.seq === group.seq + ); + if (!!curGroupBuddyList && curGroupBuddyList.length > 0) { + receiverList = curGroupBuddyList[0].buddyList; + } + } + + if (receiverList.length > 0) { this.dialogService.open< MessageWriteDialogComponent, MessageWriteDialogData, @@ -669,7 +691,7 @@ export class GroupComponent implements OnInit, OnDestroy { data: { loginRes: this.loginRes, environmentsInfo: this.environmentsInfo, - receiverList: curGroupBuddyList[0].buddyList + receiverList } }); } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html index e067daba..4e3619a9 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html @@ -185,27 +185,28 @@
+
+
+ +
+ +
-
-
- -
- -
+
; + searchEventListProcessing: boolean; + searchEventListProcessingSubscription: Subscription; eventInfoStatus: InfoResponse; eventInfoStatusSubscription: Subscription; sessionVerInfo: VersionInfo2Response; @@ -167,7 +166,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { interval: any; /** About Searching */ - isShowSearchArea = true; + isShowSearchArea = false; moreSearchProcessing = false; searchText = ''; searchedList: Info[]; @@ -193,6 +192,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { /** About ReadHere */ firstcheckReadHere = true; clearReadHere = false; + initRoomLastEventSeq: number; snackBarPreviewEvent: MatSnackBarRef; @@ -260,6 +260,25 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { select(AppStore.MessengerSelector.EventSelector.infoListProcessing) ); + this.searchEventListProcessingSubscription = this.store + .pipe( + select( + AppStore.MessengerSelector.EventSelector.infoSearchListProcessing + ), + tap(process => { + this.searchEventListProcessing = process; + if (!process && this.isShowSearchArea) { + this.doSearchTextInEvent(this.searchText); + this.snackBarService.open('대화검색을 마쳤습니다.', '확인', { + duration: 3000, + verticalPosition: 'top', + horizontalPosition: 'center' + }); + } + }) + ) + .subscribe(); + this.eventRemain$ = this.store.pipe( select(AppStore.MessengerSelector.EventSelector.remainInfo), tap(remainInfo => { @@ -300,9 +319,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { if (this.moreSearchProcessing) { const baseseq = this.baseEventSeq; - setTimeout(() => { - this.onSearchChat(this.searchText, baseseq); - }, 800); + // setTimeout(() => { + // this.doSearchTextInEvent(this.searchText, baseseq); + // }, 800); this.baseEventSeq = infoList[0].seq; } else { if (!!infoList && infoList.length > 0) { @@ -340,7 +359,16 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { this.eventInfoStatusSubscription = this.store .pipe( select(AppStore.MessengerSelector.EventSelector.infoStatus), - tap(res => (this.eventInfoStatus = res)) + tap(res => { + this.eventInfoStatus = res; + + if (!!res) { + const elist = this.eventList; + if (res.baseSeq === 0 && elist.length > 0) { + this.initRoomLastEventSeq = elist[elist.length - 1].seq; + } + } + }) ) .subscribe(); @@ -367,6 +395,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { if (!!this.eventInfoStatusSubscription) { this.eventInfoStatusSubscription.unsubscribe(); } + if (!!this.searchEventListProcessingSubscription) { + this.searchEventListProcessingSubscription.unsubscribe(); + } clearInterval(this.interval); } @@ -1511,6 +1542,19 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { onSearchChat(searchText: string, baseSeq?: number) { this.searchText = searchText; + // CASE :: searching text after retrieve All event Infos. + this.store.dispatch( + EventStore.infoAll({ + roomSeq: this.roomInfo.roomSeq, + baseSeq: this.eventList[0].seq, + requestCount: + environment.productConfig.CommonSetting.eventRequestDefaultCount * 2 + }) + ); + + // this.doSearchTextInEvent(searchText); + } + doSearchTextInEvent(searchText: string, baseSeq?: number): void { this.searchedList = this.eventList.filter(event => { let contents = ''; if (event.type === EventType.Character) { @@ -1592,6 +1636,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { this.moreSearchProcessing = true; this.eventMorePosition = this.psChatContent.directiveRef.elementRef.nativeElement.scrollHeight; + // Case :: retrieve event infos step by step until include searchtext in event.. this.store.dispatch( EventStore.infoForSearch({ req: { diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html index 33f4e6ad..45ddc55a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html @@ -66,10 +66,9 @@ + >