left side drawer is added
This commit is contained in:
parent
81f5faf0b8
commit
6952b84edb
|
@ -1,5 +1,5 @@
|
||||||
<div class="container">
|
<div #leftSideContainer class="container">
|
||||||
<div class="left-side-tabs-body">
|
<div fxFlexFill class="left-side-tabs-body">
|
||||||
<div
|
<div
|
||||||
#tabs
|
#tabs
|
||||||
class="left-side-tabs-contents"
|
class="left-side-tabs-contents"
|
||||||
|
@ -64,3 +64,7 @@
|
||||||
(buttonClick)="onClickFab($event)"
|
(buttonClick)="onClickFab($event)"
|
||||||
></ucap-float-action-button>
|
></ucap-float-action-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button mat-icon-button class="left-drawer-toggle" *ngIf="showLeftDrawerToggle">
|
||||||
|
<mat-icon>settings</mat-icon>
|
||||||
|
</button>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 250px;
|
width: 300px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,3 +124,8 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left-drawer-toggle {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import {
|
||||||
QueryList,
|
QueryList,
|
||||||
ElementRef,
|
ElementRef,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
ViewChild
|
ViewChild,
|
||||||
|
HostListener
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
|
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
|
||||||
|
@ -75,6 +76,9 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
@ViewChild('messageBoxComponent', { static: false })
|
@ViewChild('messageBoxComponent', { static: false })
|
||||||
messageBoxComponent: MessageBoxComponent;
|
messageBoxComponent: MessageBoxComponent;
|
||||||
|
|
||||||
|
@ViewChild('leftSideContainer', { static: false })
|
||||||
|
leftSideContainer: ElementRef<HTMLElement>;
|
||||||
|
|
||||||
onLangChangeSubscription: Subscription;
|
onLangChangeSubscription: Subscription;
|
||||||
|
|
||||||
badgeChatUnReadCount: number;
|
badgeChatUnReadCount: number;
|
||||||
|
@ -96,6 +100,8 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
loginRes: LoginResponse;
|
loginRes: LoginResponse;
|
||||||
loginResSubscription: Subscription;
|
loginResSubscription: Subscription;
|
||||||
|
|
||||||
|
showLeftDrawerToggle = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
|
@ -181,6 +187,31 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
this.logger.debug('-----------------------LeftSideComponent ngOnDestroy');
|
this.logger.debug('-----------------------LeftSideComponent ngOnDestroy');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@HostListener('mouseenter', ['$event'])
|
||||||
|
mouseOver(event: MouseEvent) {
|
||||||
|
const rect = this.leftSideContainer.nativeElement.getBoundingClientRect();
|
||||||
|
|
||||||
|
const minX = rect.left + rect.width - 5;
|
||||||
|
const maxX = rect.left + rect.width;
|
||||||
|
const minY = rect.top;
|
||||||
|
const maxY = rect.top + rect.height;
|
||||||
|
|
||||||
|
if (
|
||||||
|
event.pageX >= minX &&
|
||||||
|
event.pageX <= maxX &&
|
||||||
|
event.pageY >= minY &&
|
||||||
|
event.pageY <= maxY
|
||||||
|
) {
|
||||||
|
this.logger.debug('mouseOver edge of container');
|
||||||
|
this.showLeftDrawerToggle = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@HostListener('mouseleave', ['$event'])
|
||||||
|
mouseLeave(event: MouseEvent) {
|
||||||
|
this.showLeftDrawerToggle = false;
|
||||||
|
}
|
||||||
|
|
||||||
async onClickNewChat(type: string = 'NORMAL') {
|
async onClickNewChat(type: string = 'NORMAL') {
|
||||||
const result = await this.dialogService.open<
|
const result = await this.dialogService.open<
|
||||||
CreateChatDialogComponent,
|
CreateChatDialogComponent,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user