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 @@