대화방 타입별 context menu 분리처리.
This commit is contained in:
parent
f162cf3353
commit
06ff83c0c3
|
@ -86,25 +86,53 @@
|
|||
</button>
|
||||
|
||||
<mat-menu #contactMenu="matMenu" [hasBackdrop]="false">
|
||||
<button mat-menu-item (click)="onClickContextMenu('OPEN_ALBUM_LIST')">
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowContextMenu('OPEN_ALBUM_LIST')"
|
||||
(click)="onClickContextMenu('OPEN_ALBUM_LIST')"
|
||||
>
|
||||
앨범함
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickContextMenu('OPEN_FILE_LIST')">
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowContextMenu('OPEN_FILE_LIST')"
|
||||
(click)="onClickContextMenu('OPEN_FILE_LIST')"
|
||||
>
|
||||
파일함
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickContextMenu('OPEN_ROOM_USER')">
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowContextMenu('OPEN_ROOM_USER')"
|
||||
(click)="onClickContextMenu('OPEN_ROOM_USER')"
|
||||
>
|
||||
대화참여자목록
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickContextMenu('ADD_MEMBER')">
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowContextMenu('ADD_MEMBER')"
|
||||
(click)="onClickContextMenu('ADD_MEMBER')"
|
||||
>
|
||||
대화상대추가
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickContextMenu('ADD_GROUP')">
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowContextMenu('ADD_GROUP')"
|
||||
(click)="onClickContextMenu('ADD_GROUP')"
|
||||
>
|
||||
그룹멤버로추가
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickContextMenu('EDIT_ROOM')">
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowContextMenu('EDIT_ROOM')"
|
||||
(click)="onClickContextMenu('EDIT_ROOM')"
|
||||
>
|
||||
대화방설정
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickContextMenu('CLOSE_ROOM')">
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowContextMenu('CLOSE_ROOM')"
|
||||
(click)="onClickContextMenu('CLOSE_ROOM')"
|
||||
>
|
||||
방닫기
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
|
|
@ -331,6 +331,26 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
}
|
||||
}
|
||||
|
||||
getShowContextMenu(menuType: string) {
|
||||
if (
|
||||
menuType === 'OPEN_ROOM_USER' ||
|
||||
menuType === 'ADD_MEMBER' ||
|
||||
menuType === 'ADD_GROUP' ||
|
||||
menuType === 'EDIT_ROOM'
|
||||
) {
|
||||
if (
|
||||
this.roomInfo.roomType === RoomType.Mytalk ||
|
||||
this.roomInfo.roomType === RoomType.Allim ||
|
||||
this.roomInfo.roomType === RoomType.Bot ||
|
||||
this.roomInfo.roomType === RoomType.Link
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
readyToReply(): void {
|
||||
setTimeout(() => {
|
||||
this.focusReplyInput();
|
||||
|
|
Loading…
Reference in New Issue
Block a user