2019-09-23 05:23:24 +00:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2019-10-16 08:46:53 +00:00
|
|
|
import { NGXLogger } from 'ngx-logger';
|
|
|
|
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
|
|
|
|
import {
|
|
|
|
CreateChatDialogComponent,
|
|
|
|
CreateChatDialogData,
|
|
|
|
CreateChatDialogResult
|
|
|
|
} from '../dialogs/create-chat.dialog.component';
|
2019-09-23 05:23:24 +00:00
|
|
|
|
|
|
|
@Component({
|
2019-09-26 02:11:22 +00:00
|
|
|
selector: 'app-layout-messenger-left-side',
|
|
|
|
templateUrl: './left-side.component.html',
|
|
|
|
styleUrls: ['./left-side.component.scss'],
|
2019-09-23 05:23:24 +00:00
|
|
|
animations: ucapAnimations
|
|
|
|
})
|
2019-09-26 02:11:22 +00:00
|
|
|
export class LeftSideComponent implements OnInit {
|
2019-10-16 08:46:53 +00:00
|
|
|
constructor(
|
|
|
|
private dialogService: DialogService,
|
|
|
|
private logger: NGXLogger
|
|
|
|
) {}
|
2019-09-23 05:23:24 +00:00
|
|
|
|
|
|
|
ngOnInit() {}
|
2019-10-16 08:46:53 +00:00
|
|
|
|
|
|
|
async onClickNewChat() {
|
|
|
|
const result = await this.dialogService.open<
|
|
|
|
CreateChatDialogComponent,
|
|
|
|
CreateChatDialogData,
|
|
|
|
CreateChatDialogResult
|
|
|
|
>(CreateChatDialogComponent, {
|
|
|
|
width: '500px',
|
|
|
|
height: '500px',
|
|
|
|
data: {
|
|
|
|
title: 'New Chat'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
this.logger.debug(result.choice);
|
|
|
|
// if (result.choice) {
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// }
|
|
|
|
}
|
2019-09-23 05:23:24 +00:00
|
|
|
}
|