next-ucap-messenger/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts

45 lines
1.0 KiB
TypeScript
Raw Normal View History

import { Component, OnInit } from '@angular/core';
import { NGXLogger } from 'ngx-logger';
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
import {
CreateChatDialogComponent,
CreateChatDialogData,
CreateChatDialogResult
2019-10-17 00:18:55 +00:00
} from '@app/layouts/messenger/dialogs/chat/create-chat.dialog.component';
@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'],
animations: ucapAnimations
})
2019-09-26 02:11:22 +00:00
export class LeftSideComponent implements OnInit {
constructor(
private dialogService: DialogService,
private logger: NGXLogger
) {}
ngOnInit() {}
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 {
// }
}
}