대화상대추가 팝업연결
This commit is contained in:
parent
bf9bcd967b
commit
89a1f90065
@ -46,15 +46,15 @@ export class LeftSideComponent implements OnInit {
|
|||||||
select(AppStore.MessengerSelector.SyncSelector.selectChatUnreadCount)
|
select(AppStore.MessengerSelector.SyncSelector.selectChatUnreadCount)
|
||||||
);
|
);
|
||||||
this.fabButtons = [
|
this.fabButtons = [
|
||||||
|
{
|
||||||
|
icon: 'timer',
|
||||||
|
tooltip: 'New Timer Chat',
|
||||||
|
divisionType: 'NEW_TIMER_CHAT'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
icon: 'chat',
|
icon: 'chat',
|
||||||
tooltip: 'New Chat',
|
tooltip: 'New Chat',
|
||||||
divisionType: 'NEW_CHAT'
|
divisionType: 'NEW_CHAT'
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'textsms',
|
|
||||||
tooltip: 'New Timer Chat',
|
|
||||||
divisionType: 'NEW_TIMER_CHAT'
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -66,7 +66,6 @@ export class LeftSideComponent implements OnInit {
|
|||||||
CreateChatDialogResult
|
CreateChatDialogResult
|
||||||
>(CreateChatDialogComponent, {
|
>(CreateChatDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
height: '500px',
|
|
||||||
data: {
|
data: {
|
||||||
type: UserSelectDialogType.NewChat,
|
type: UserSelectDialogType.NewChat,
|
||||||
title: type === 'TIMER' ? 'New Timer Chat' : 'New Chat'
|
title: type === 'TIMER' ? 'New Timer Chat' : 'New Chat'
|
||||||
|
@ -389,7 +389,6 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||||||
CreateChatDialogResult
|
CreateChatDialogResult
|
||||||
>(CreateChatDialogComponent, {
|
>(CreateChatDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
type: UserSelectDialogType.EditMember,
|
type: UserSelectDialogType.EditMember,
|
||||||
title: 'Group Member Edit',
|
title: 'Group Member Edit',
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
mat-icon-button
|
mat-icon-button
|
||||||
aria-label="chats button"
|
aria-label="chats button"
|
||||||
class="responsive-chats-button"
|
class="responsive-chats-button"
|
||||||
*ngIf="!!roomInfo && roomInfo.isTimeRoom">
|
*ngIf="!!roomInfo && roomInfo.isTimeRoom"
|
||||||
|
>
|
||||||
<mat-icon>timer</mat-icon>
|
<mat-icon>timer</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -26,15 +27,16 @@
|
|||||||
{{ getRoomName() }}
|
{{ getRoomName() }}
|
||||||
</h3>
|
</h3>
|
||||||
<!-- Timer Room Info -->
|
<!-- Timer Room Info -->
|
||||||
<div *ngIf="roomInfo && roomInfo.isTimeRoom" class="room-type text-accent-color ">
|
<div
|
||||||
<span class="bg-accent-light">{{ getConvertTimer(roomInfo.timeRoomInterval) }} </span>비밀 대화방입니다.
|
*ngIf="roomInfo && roomInfo.isTimeRoom"
|
||||||
|
class="room-type text-accent-color "
|
||||||
|
>
|
||||||
|
<span class="bg-accent-light"
|
||||||
|
>{{ getConvertTimer(roomInfo.timeRoomInterval) }} </span
|
||||||
|
>비밀 대화방입니다.
|
||||||
</div>
|
</div>
|
||||||
<!-- Timer Room Info -->
|
<!-- Timer Room Info -->
|
||||||
</div>
|
</div>
|
||||||
<!--<div *ngIf="!!roomInfo && roomInfo.isTimeRoom">
|
|
||||||
<mat-icon>timer</mat-icon>
|
|
||||||
{{ getConvertTimer(roomInfo.timeRoomInterval) }}
|
|
||||||
</div>-->
|
|
||||||
<div class="room-option">
|
<div class="room-option">
|
||||||
<button
|
<button
|
||||||
*ngIf="!!roomInfo"
|
*ngIf="!!roomInfo"
|
||||||
@ -59,6 +61,9 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<mat-menu #contactMenu="matMenu" [hasBackdrop]="false">
|
<mat-menu #contactMenu="matMenu" [hasBackdrop]="false">
|
||||||
|
<button mat-menu-item (click)="onClickContextMenu('ADD_MEMBER')">
|
||||||
|
대화상대추가
|
||||||
|
</button>
|
||||||
<button mat-menu-item (click)="onClickContextMenu('CLOSE_ROOM')">
|
<button mat-menu-item (click)="onClickContextMenu('CLOSE_ROOM')">
|
||||||
방닫기
|
방닫기
|
||||||
</button>
|
</button>
|
||||||
@ -82,8 +87,6 @@
|
|||||||
(fileDragOver)="onFileDragOver()"
|
(fileDragOver)="onFileDragOver()"
|
||||||
(fileDragLeave)="onFileDragLeave()"
|
(fileDragLeave)="onFileDragLeave()"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
<!-- CHAT MESSAGES -->
|
<!-- CHAT MESSAGES -->
|
||||||
<perfect-scrollbar
|
<perfect-scrollbar
|
||||||
fxFlex="1 1 auto"
|
fxFlex="1 1 auto"
|
||||||
|
@ -432,7 +432,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
CreateChatDialogResult
|
CreateChatDialogResult
|
||||||
>(CreateChatDialogComponent, {
|
>(CreateChatDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
height: '500px',
|
|
||||||
data: {
|
data: {
|
||||||
type: UserSelectDialogType.MessageForward,
|
type: UserSelectDialogType.MessageForward,
|
||||||
title: 'MessageForward',
|
title: 'MessageForward',
|
||||||
@ -542,8 +541,58 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickContextMenu(menuType: string) {
|
async onClickContextMenu(menuType: string) {
|
||||||
switch (menuType) {
|
switch (menuType) {
|
||||||
|
case 'ADD_MEMBER':
|
||||||
|
{
|
||||||
|
console.log(this.roomInfo);
|
||||||
|
console.log(this.userInfoList);
|
||||||
|
|
||||||
|
const result = await this.dialogService.open<
|
||||||
|
CreateChatDialogComponent,
|
||||||
|
CreateChatDialogData,
|
||||||
|
CreateChatDialogResult
|
||||||
|
>(CreateChatDialogComponent, {
|
||||||
|
width: '600px',
|
||||||
|
data: {
|
||||||
|
type: UserSelectDialogType.EditChatMember,
|
||||||
|
title: 'Edit Chat Member'
|
||||||
|
// ,
|
||||||
|
// curRoomUser: this.userInfoList
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!result && !!result.choice && result.choice) {
|
||||||
|
const userSeqs: number[] = [];
|
||||||
|
let roomSeq = '';
|
||||||
|
if (
|
||||||
|
!!result.selectedUserList &&
|
||||||
|
result.selectedUserList.length > 0
|
||||||
|
) {
|
||||||
|
result.selectedUserList.map(user => userSeqs.push(user.seq));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!!result.selectedRoom) {
|
||||||
|
roomSeq = result.selectedRoom.roomSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userSeqs.length > 0 || roomSeq.trim().length > 0) {
|
||||||
|
// this.store.dispatch(
|
||||||
|
// EventStore.forward({
|
||||||
|
// senderSeq: this.loginRes.userSeq,
|
||||||
|
// req: {
|
||||||
|
// roomSeq: '-999',
|
||||||
|
// eventType: message.type,
|
||||||
|
// sentMessage: message.sentMessage
|
||||||
|
// },
|
||||||
|
// trgtUserSeqs: userSeqs,
|
||||||
|
// trgtRoomSeq: roomSeq
|
||||||
|
// })
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'CLOSE_ROOM':
|
case 'CLOSE_ROOM':
|
||||||
{
|
{
|
||||||
this.store.dispatch(ChatStore.clearSelectedRoom());
|
this.store.dispatch(ChatStore.clearSelectedRoom());
|
||||||
|
@ -56,6 +56,8 @@ export interface CreateChatDialogData {
|
|||||||
group?: GroupDetailData;
|
group?: GroupDetailData;
|
||||||
/** CASE :: EventForward */
|
/** CASE :: EventForward */
|
||||||
ignoreRoom?: RoomInfo[];
|
ignoreRoom?: RoomInfo[];
|
||||||
|
/** CASE :: EditCharMember */
|
||||||
|
curRoomUser?: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateChatDialogResult {
|
export interface CreateChatDialogResult {
|
||||||
|
@ -18,7 +18,8 @@ import {
|
|||||||
map,
|
map,
|
||||||
catchError,
|
catchError,
|
||||||
exhaustMap,
|
exhaustMap,
|
||||||
withLatestFrom
|
withLatestFrom,
|
||||||
|
concatMap
|
||||||
} from 'rxjs/operators';
|
} from 'rxjs/operators';
|
||||||
import {
|
import {
|
||||||
InfoData,
|
InfoData,
|
||||||
@ -256,7 +257,7 @@ export class Effects {
|
|||||||
send$ = createEffect(() =>
|
send$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(send),
|
ofType(send),
|
||||||
exhaustMap(action =>
|
concatMap(action =>
|
||||||
this.eventProtocolService.send(action.req).pipe(
|
this.eventProtocolService.send(action.req).pipe(
|
||||||
map((res: SendResponse) => {
|
map((res: SendResponse) => {
|
||||||
return sendSuccess({
|
return sendSuccess({
|
||||||
|
@ -6,5 +6,7 @@ export enum UserSelectDialogType {
|
|||||||
/** 대화 전달 */
|
/** 대화 전달 */
|
||||||
MessageForward = 'MESSAGE_FORWARD',
|
MessageForward = 'MESSAGE_FORWARD',
|
||||||
/** 그룹멤버 변경 */
|
/** 그룹멤버 변경 */
|
||||||
EditMember = 'EDIT_MEMBER'
|
EditMember = 'EDIT_MEMBER',
|
||||||
|
/** 대화상대 추가 */
|
||||||
|
EditChatMember = 'EDIT_CHAT_MEMBER'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user