diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts index 02bcd253..454b67d3 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts @@ -59,7 +59,7 @@ export class LeftSideComponent implements OnInit { ]; } - async onClickNewChat() { + async onClickNewChat(type: string = 'NORMAL') { const result = await this.dialogService.open< CreateChatDialogComponent, CreateChatDialogData, @@ -69,7 +69,7 @@ export class LeftSideComponent implements OnInit { height: '500px', data: { type: UserSelectDialogType.NewChat, - title: 'New Chat' + title: type === 'TIMER' ? 'New Timer Chat' : 'New Chat' } }); @@ -78,7 +78,13 @@ export class LeftSideComponent implements OnInit { const userSeqs: number[] = []; result.selectedUserList.map(user => userSeqs.push(user.seq)); - this.store.dispatch(ChatStore.openRoom({ userSeqList: userSeqs })); + if (type === 'NORMAL') { + this.store.dispatch(ChatStore.openRoom({ userSeqList: userSeqs })); + } else if (type === 'TIMER') { + this.store.dispatch( + ChatStore.openRoom({ userSeqList: userSeqs, isTimeRoom: true }) + ); + } } } } @@ -134,11 +140,12 @@ export class LeftSideComponent implements OnInit { switch (btn.divisionType) { case 'NEW_CHAT': { - this.onClickNewChat(); + this.onClickNewChat('NORMAL'); } break; case 'NEW_TIMER_CHAT': { + this.onClickNewChat('TIMER'); } break; } 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 24be9c99..7a068900 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 @@ -18,6 +18,9 @@
{{ getRoomName() }}
+
+ timer {{ getConvertTimer(roomInfo.timeRoomInterval) }} +