From 94dcd7905572c2996565f2c3b96bbcdbae47c4c0 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Thu, 17 Oct 2019 09:18:55 +0900 Subject: [PATCH] dialogs of app are refactored --- .../components/left-side.component.ts | 2 +- .../left-sidenav/group.component.ts | 8 ++--- .../components/messages.component.ts | 34 ++++++++++++++++++- .../create-chat.dialog.component.html | 0 .../create-chat.dialog.component.scss | 0 .../create-chat.dialog.component.spec.ts | 0 .../create-chat.dialog.component.ts | 0 .../layouts/messenger/dialogs/chat/index.ts | 3 ++ .../create-group.dialog.component.html | 0 .../create-group.dialog.component.scss | 0 .../create-group.dialog.component.spec.ts | 0 .../create-group.dialog.component.ts | 0 .../delete-group.dialog.component.html | 0 .../delete-group.dialog.component.scss | 0 .../delete-group.dialog.component.spec.ts | 0 .../delete-group.dialog.component.ts | 0 .../edit-group-member.dialog.component.html | 0 .../edit-group-member.dialog.component.scss | 0 ...edit-group-member.dialog.component.spec.ts | 0 .../edit-group-member.dialog.component.ts | 0 .../edit-group.dialog.component.html | 0 .../edit-group.dialog.component.scss | 0 .../edit-group.dialog.component.spec.ts | 0 .../edit-group.dialog.component.ts | 0 .../layouts/messenger/dialogs/group/index.ts | 11 ++++++ .../app/layouts/messenger/dialogs/index.ts | 20 +++-------- .../delete-message.dialog.component.html | 18 ++++++++++ .../delete-message.dialog.component.scss} | 0 .../delete-message.dialog.component.spec.ts | 24 +++++++++++++ .../delete-message.dialog.component.ts | 34 +++++++++++++++++++ .../messenger/dialogs/message/index.ts | 7 ++++ .../recall-message.dialog.component.html | 18 ++++++++++ .../recall-message.dialog.component.scss | 0 .../recall-message.dialog.component.spec.ts | 24 +++++++++++++ .../recall-message.dialog.component.ts | 34 +++++++++++++++++++ .../relay-message.dialog.component.html | 0 .../relay-message.dialog.component.scss | 0 .../relay-message.dialog.component.spec.ts | 0 .../relay-message.dialog.component.ts | 0 39 files changed, 215 insertions(+), 22 deletions(-) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => chat}/create-chat.dialog.component.html (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => chat}/create-chat.dialog.component.scss (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => chat}/create-chat.dialog.component.spec.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => chat}/create-chat.dialog.component.ts (100%) create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/index.ts rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/create-group.dialog.component.html (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/create-group.dialog.component.scss (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/create-group.dialog.component.spec.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/create-group.dialog.component.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/delete-group.dialog.component.html (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/delete-group.dialog.component.scss (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/delete-group.dialog.component.spec.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/delete-group.dialog.component.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group-member.dialog.component.html (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group-member.dialog.component.scss (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group-member.dialog.component.spec.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group-member.dialog.component.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group.dialog.component.html (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group.dialog.component.scss (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group.dialog.component.spec.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => group}/edit-group.dialog.component.ts (100%) create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/index.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.html rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{relay-message.dialog.component.scss => message/delete-message.dialog.component.scss} (100%) create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.spec.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.html create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.scss create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.spec.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.ts rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => message}/relay-message.dialog.component.html (100%) create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.scss rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => message}/relay-message.dialog.component.spec.ts (100%) rename projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/{ => message}/relay-message.dialog.component.ts (100%) 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 2a84d702..822c80c4 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 @@ -5,7 +5,7 @@ import { CreateChatDialogComponent, CreateChatDialogData, CreateChatDialogResult -} from '../dialogs/create-chat.dialog.component'; +} from '@app/layouts/messenger/dialogs/chat/create-chat.dialog.component'; @Component({ selector: 'app-layout-messenger-left-side', 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 9388544b..a8dcb424 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 @@ -20,7 +20,7 @@ import { CreateGroupDialogComponent, CreateGroupDialogData, CreateGroupDialogResult -} from '@app/layouts/messenger/dialogs/create-group.dialog.component'; +} from '@app/layouts/messenger/dialogs/group/create-group.dialog.component'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { DeptSearchType, @@ -35,18 +35,18 @@ import { DeleteGroupDialogComponent, DeleteGroupDialogData, DeleteGroupDialogResult -} from '@app/layouts/messenger/dialogs/delete-group.dialog.component'; +} from '@app/layouts/messenger/dialogs/group/delete-group.dialog.component'; import { EditGroupDialogComponent, EditGroupDialogData, EditGroupDialogResult -} from '@app/layouts/messenger/dialogs/edit-group.dialog.component'; +} from '@app/layouts/messenger/dialogs/group/edit-group.dialog.component'; import { EditGroupMemberDialogComponent, EditGroupMemberDialogData, EditGroupMemberDialogResult -} from '@app/layouts/messenger/dialogs/edit-group-member.dialog.component'; +} from '@app/layouts/messenger/dialogs/group/edit-group-member.dialog.component'; @Component({ selector: 'app-layout-chat-left-sidenav-group', diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index 99d6bb2b..f0d1e67f 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -43,11 +43,21 @@ import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { MatMenuTrigger } from '@angular/material'; import { CommonApiService } from '@ucap-webmessenger/api-common'; +import { + DeleteMessageDialogComponent, + DeleteMessageDialogData, + DeleteMessageDialogResult +} from '@app/layouts/messenger/dialogs/message/delete-message.dialog.component'; import { RelayMessageDialogComponent, RelayMessageDialogData, RelayMessageDialogResult -} from '@app/layouts/messenger/dialogs/relay-message.dialog.component'; +} from '@app/layouts/messenger/dialogs/message/relay-message.dialog.component'; +import { + RecallMessageDialogComponent, + RecallMessageDialogData, + RecallMessageDialogResult +} from '@app/layouts/messenger/dialogs/message/recall-message.dialog.component'; @Component({ selector: 'app-layout-messenger-messages', @@ -272,10 +282,32 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked { break; case 'DELETE': { + const result = await this.dialogService.open< + DeleteMessageDialogComponent, + DeleteMessageDialogData, + DeleteMessageDialogResult + >(DeleteMessageDialogComponent, { + width: '220px', + data: { + title: 'Logout', + message: 'Logout ?' + } + }); } break; case 'RECALL': { + const result = await this.dialogService.open< + RecallMessageDialogComponent, + RecallMessageDialogData, + RecallMessageDialogResult + >(RecallMessageDialogComponent, { + width: '220px', + data: { + title: 'Logout', + message: 'Logout ?' + } + }); } break; default: diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.html rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.scss rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.spec.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.spec.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.spec.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/index.ts new file mode 100644 index 00000000..a2b25b02 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/index.ts @@ -0,0 +1,3 @@ +import { CreateChatDialogComponent } from './create-chat.dialog.component'; + +export const DIALOGS = [CreateChatDialogComponent]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.html similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.html rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.html diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.scss similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.scss rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.scss diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.spec.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.spec.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.spec.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-group.dialog.component.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/create-group.dialog.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.html similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.html rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.html diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.scss similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.scss rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.scss diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.spec.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.spec.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.spec.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/delete-group.dialog.component.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/delete-group.dialog.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.html similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.html rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.html diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.scss similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.scss rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.scss diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.spec.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.spec.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.spec.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group-member.dialog.component.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group-member.dialog.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.html similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.html rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.html diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.scss similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.scss rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.scss diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.spec.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.spec.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.spec.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/edit-group.dialog.component.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/index.ts new file mode 100644 index 00000000..dc3d41a7 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/index.ts @@ -0,0 +1,11 @@ +import { CreateGroupDialogComponent } from './create-group.dialog.component'; +import { DeleteGroupDialogComponent } from './delete-group.dialog.component'; +import { EditGroupDialogComponent } from './edit-group.dialog.component'; +import { EditGroupMemberDialogComponent } from './edit-group-member.dialog.component'; + +export const DIALOGS = [ + CreateGroupDialogComponent, + DeleteGroupDialogComponent, + EditGroupDialogComponent, + EditGroupMemberDialogComponent +]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts index 3c00f61a..f38a4c2e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/index.ts @@ -1,17 +1,5 @@ -import { CreateGroupDialogComponent } from './create-group.dialog.component'; -import { CreateChatDialogComponent } from './create-chat.dialog.component'; -import { DeleteGroupDialogComponent } from './delete-group.dialog.component'; -import { EditGroupDialogComponent } from './edit-group.dialog.component'; -import { EditGroupMemberDialogComponent } from './edit-group-member.dialog.component'; +import { DIALOGS as CHAT_DIALOGS } from './chat'; +import { DIALOGS as GROUP_DIALOGS } from './group'; +import { DIALOGS as MESSAGE_DIALOGS } from './message'; -import { RelayMessageDialogComponent } from './relay-message.dialog.component'; - -export const DIALOGS = [ - CreateChatDialogComponent, - CreateGroupDialogComponent, - DeleteGroupDialogComponent, - EditGroupDialogComponent, - EditGroupMemberDialogComponent, - - RelayMessageDialogComponent -]; +export const DIALOGS = [...CHAT_DIALOGS, ...GROUP_DIALOGS, ...MESSAGE_DIALOGS]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.html new file mode 100644 index 00000000..6f16ec08 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.html @@ -0,0 +1,18 @@ + + + 대화 삭제 + + + + + + + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.scss similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.scss rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.scss diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.spec.ts new file mode 100644 index 00000000..205ed5f6 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DeleteMessageDialogComponent } from './delete-message.dialog.component'; + +describe('app::layouts::messenger::DeleteMessageDialogComponent', () => { + let component: DeleteMessageDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [DeleteMessageDialogComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DeleteMessageDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.ts new file mode 100644 index 00000000..b08fb258 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/delete-message.dialog.component.ts @@ -0,0 +1,34 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; + +export interface DeleteMessageDialogData { + title: string; + message?: string; +} + +export interface DeleteMessageDialogResult { + choice: boolean; +} + +@Component({ + selector: 'app-layout-messenger-delete-message', + templateUrl: './delete-message.dialog.component.html', + styleUrls: ['./delete-message.dialog.component.scss'] +}) +export class DeleteMessageDialogComponent implements OnInit { + constructor( + public dialogRef: MatDialogRef< + DeleteMessageDialogData, + DeleteMessageDialogResult + >, + @Inject(MAT_DIALOG_DATA) public data: DeleteMessageDialogData + ) {} + + ngOnInit(): void {} + + onClickChoice(choice: boolean): void { + this.dialogRef.close({ + choice + }); + } +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts new file mode 100644 index 00000000..a38da889 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/index.ts @@ -0,0 +1,7 @@ +import { DeleteMessageDialogComponent } from './delete-message.dialog.component'; +import { RelayMessageDialogComponent } from './relay-message.dialog.component'; + +export const DIALOGS = [ + DeleteMessageDialogComponent, + RelayMessageDialogComponent +]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.html new file mode 100644 index 00000000..b9322b53 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.html @@ -0,0 +1,18 @@ + + + 대화 회수 + + + + + + + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.spec.ts new file mode 100644 index 00000000..e5006cc4 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RecallMessageDialogComponent } from './recall-message.dialog.component'; + +describe('app::layouts::messenger::RecallMessageDialogComponent', () => { + let component: RecallMessageDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [RecallMessageDialogComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RecallMessageDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.ts new file mode 100644 index 00000000..cd11934d --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/recall-message.dialog.component.ts @@ -0,0 +1,34 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; + +export interface RecallMessageDialogData { + title: string; + message?: string; +} + +export interface RecallMessageDialogResult { + choice: boolean; +} + +@Component({ + selector: 'app-layout-messenger-recall-message', + templateUrl: './recall-message.dialog.component.html', + styleUrls: ['./recall-message.dialog.component.scss'] +}) +export class RecallMessageDialogComponent implements OnInit { + constructor( + public dialogRef: MatDialogRef< + RecallMessageDialogData, + RecallMessageDialogResult + >, + @Inject(MAT_DIALOG_DATA) public data: RecallMessageDialogData + ) {} + + ngOnInit(): void {} + + onClickChoice(choice: boolean): void { + this.dialogRef.close({ + choice + }); + } +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.html similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.html rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.html diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.spec.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.spec.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.spec.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.ts similarity index 100% rename from projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/relay-message.dialog.component.ts rename to projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/relay-message.dialog.component.ts