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 7dca715b..3ebfe9e5 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 @@ -1,3 +1,4 @@ +import { UserSelectDialogType } from './../../../types/userselect.dialog.type'; import { Component, OnInit } from '@angular/core'; import { NGXLogger } from 'ngx-logger'; import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui'; @@ -39,9 +40,10 @@ export class LeftSideComponent implements OnInit { CreateChatDialogData, CreateChatDialogResult >(CreateChatDialogComponent, { - width: '500px', + width: '600px', height: '500px', data: { + type: UserSelectDialogType.NewChat, title: 'New Chat' } }); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html index fb520f1b..7636d80a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html @@ -52,7 +52,7 @@ > - + chat @@ -67,10 +67,18 @@ -
+
  • {{ userInfo.name }} + +
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts index 34841844..c3961b12 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts @@ -1,3 +1,4 @@ +import { UserSelectDialogType } from './../../../../types/userselect.dialog.type'; import { Component, OnInit, OnDestroy, Inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; import { NGXLogger } from 'ngx-logger'; @@ -33,6 +34,7 @@ import { } from '@ucap-webmessenger/protocol-room'; export interface CreateChatDialogData { + type?: string; title: string; } @@ -58,6 +60,8 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy { private logger: NGXLogger ) {} + UserSelectDialogType = UserSelectDialogType; + loginRes: LoginResponse; loginResSubscription: Subscription; sessionVerinfo = this.sessionStorageService.get( @@ -252,6 +256,13 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy { return false; } + /** 선택된 사용자 취소 */ + onClickDeleteUser(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) { + this.selectedUserList = this.selectedUserList.filter( + item => item.seq !== userInfo.seq + ); + } + /** 팝업의 선택 이벤트 전달. */ onClickChoice(choice: boolean): void { this.dialogRef.close({ diff --git a/projects/ucap-webmessenger-app/src/app/types/index.ts b/projects/ucap-webmessenger-app/src/app/types/index.ts index bd6be849..7deddfe7 100644 --- a/projects/ucap-webmessenger-app/src/app/types/index.ts +++ b/projects/ucap-webmessenger-app/src/app/types/index.ts @@ -1,2 +1,3 @@ export * from './environment.type'; export * from './login-info.type'; +export * from './userselect.dialog.type'; diff --git a/projects/ucap-webmessenger-app/src/app/types/userselect.dialog.type.ts b/projects/ucap-webmessenger-app/src/app/types/userselect.dialog.type.ts new file mode 100644 index 00000000..9779d5d5 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/types/userselect.dialog.type.ts @@ -0,0 +1,10 @@ +export enum UserSelectDialogType { + /** 새로운 대화 */ + NewChat = 'NEW_CHAT', + /** 새로운 그룹 생성 */ + NewGroup = 'NEW_GROUP', + /** 대화 전달 */ + MessageForward = 'MESSAGE_FORWARD', + /** 그룹멤버 변경 */ + GroupMemberUpdate = 'GROUP_MEMBER_UPDATE' +}