From 239404257c3493b1bfe7a9acba430e390fda5d8f Mon Sep 17 00:00:00 2001 From: leejh Date: Thu, 31 Oct 2019 10:26:47 +0900 Subject: [PATCH] =?UTF-8?q?FAB=20=ED=88=B4=ED=8C=81=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EC=83=88=20=EB=8C=80?= =?UTF-8?q?=ED=99=94=20=ED=8C=9D=EC=97=85=20=EC=97=B0=EB=8F=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/left-side.component.ts | 37 +++++++++++++------ .../float-action-button.component.html | 2 + .../float-action-button.component.ts | 9 +++++ .../src/lib/ucap-ui.module.ts | 2 + 4 files changed, 39 insertions(+), 11 deletions(-) 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 de430cb0..02bcd253 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 @@ -18,6 +18,7 @@ import { UserInfoF, UserInfoDN } from '@ucap-webmessenger/protocol-query'; +import { BuiltinType } from '@angular/compiler'; @Component({ selector: 'app-layout-messenger-left-side', @@ -32,7 +33,7 @@ export class LeftSideComponent implements OnInit { selectedUserList: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = []; /** FAB */ - fabButtons: { icon: string }[]; + fabButtons: { icon: string; tooltip?: string; divisionType?: string }[]; constructor( private store: Store, @@ -46,16 +47,14 @@ export class LeftSideComponent implements OnInit { ); this.fabButtons = [ { - icon: 'timeline' + icon: 'chat', + tooltip: 'New Chat', + divisionType: 'NEW_CHAT' }, { - icon: 'view_headline' - }, - { - icon: 'room' - }, - { - icon: 'lock' + icon: 'textsms', + tooltip: 'New Timer Chat', + divisionType: 'NEW_TIMER_CHAT' } ]; } @@ -125,7 +124,23 @@ export class LeftSideComponent implements OnInit { } /** FAB */ - onClickFab(params: { btn: { icon: string } }) { - this.logger.debug('FAB click', params.btn); + onClickFab(params: { btn: any }) { + const btn = params.btn as { + icon: string; + tooltip?: string; + divisionType?: string; + }; + + switch (btn.divisionType) { + case 'NEW_CHAT': + { + this.onClickNewChat(); + } + break; + case 'NEW_TIMER_CHAT': + { + } + break; + } } } diff --git a/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.html b/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.html index 2d9a2ceb..480436d3 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.html @@ -11,6 +11,8 @@