From 1dc65479e14283bff41c59c19c09fb34eaf50fe9 Mon Sep 17 00:00:00 2001 From: leejh Date: Wed, 6 Nov 2019 17:32:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B1=84=ED=8C=85=EB=B0=A9=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=88=98=EC=A0=95=20>=20=EC=B1=84=ED=8C=85?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=EC=B0=BD=20enable=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC.=20>=20=EB=B4=87=EB=B0=A9=20=EB=B0=A9?= =?UTF-8?q?=EC=A0=9C=EB=AA=A9=20=EC=B2=98=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/messages.component.html | 2 +- .../components/messages.component.ts | 34 ++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html index 12664ece..f0bf30c8 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html @@ -124,7 +124,7 @@ -
+
user.seq !== this.loginRes.userSeq) + .map(user => user.name); + } + if (!!this.roomInfo.roomName && '' !== this.roomInfo.roomName.trim()) { return this.roomInfo.roomName; - } else if (this.roomInfo.roomType === RoomType.Mytalk) { - return 'MyTalk'; } else { return this.userInfoList .filter(user => { @@ -243,6 +251,22 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { } } + getEnableSend() { + if (!this.roomInfo) { + return false; + } + + if ( + this.roomInfo.roomType === RoomType.Bot || + this.roomInfo.roomType === RoomType.Allim || + this.roomInfo.roomType === RoomType.Link + ) { + return false; + } + + return true; + } + getConvertTimer(timerInterval: number, unit: number = 1) { if (timerInterval >= 0 && timerInterval < 60 * unit) { return Math.floor((timerInterval / 1) * unit) + ' 초'; @@ -266,7 +290,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { focusReplyInput(): void { setTimeout(() => { - this.chatForm.focus(); + if (!!this.chatForm) { + this.chatForm.focus(); + } }); }