diff --git a/frontend/src/app/chat/chat-controls/chat-controls.component.html b/frontend/src/app/chat/chat-controls/chat-controls.component.html index c8429b66..ef41795e 100644 --- a/frontend/src/app/chat/chat-controls/chat-controls.component.html +++ b/frontend/src/app/chat/chat-controls/chat-controls.component.html @@ -1,31 +1,18 @@ - +
- + - Attachments: { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ChatControlsComponent ] - }) - .compileComponents(); + declarations: [ChatControlsComponent], + }).compileComponents(); })); beforeEach(() => { diff --git a/frontend/src/app/chat/chat-controls/chat-controls.component.ts b/frontend/src/app/chat/chat-controls/chat-controls.component.ts index cc21e338..79a72e27 100644 --- a/frontend/src/app/chat/chat-controls/chat-controls.component.ts +++ b/frontend/src/app/chat/chat-controls/chat-controls.component.ts @@ -3,12 +3,12 @@ import { Component, Input, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { debounceTime, filter, throttleTime } from 'rxjs/operators'; // import {FirebaseAttachmentService} from "@app/chat/services/firebase/firebase-attachment.service"; -import {FirebaseChatService} from "@app/chat/services/firebase/firebase-chat.service"; +import { FirebaseChatService } from '@app/chat/services/firebase/firebase-chat.service'; @Component({ selector: 'app-chat-controls', templateUrl: './chat-controls.component.html', - styleUrls: ['./chat-controls.component.scss'] + styleUrls: ['./chat-controls.component.scss'], }) export class ChatControlsComponent implements OnInit { @Input() chatId: string = ''; @@ -30,19 +30,19 @@ export class ChatControlsComponent implements OnInit { this.messageControl.valueChanges .pipe( - filter(data => data !== ''), + filter((data) => data !== ''), throttleTime(1400) ) - .subscribe(data => { + .subscribe((data) => { // this.chatService.sendIsTyping(this.chatId).then(); }); this.messageControl.valueChanges .pipe( - filter(data => data !== ''), + filter((data) => data !== ''), debounceTime(1500) ) - .subscribe(data => { + .subscribe((data) => { // this.chatService.deleteIsTyping(this.chatId).then(); }); } @@ -75,7 +75,7 @@ export class ChatControlsComponent implements OnInit { getAttachments(): File[] { // return this.attachmentService.getFiles(); - return [] + return []; } hasAttachments() { diff --git a/frontend/src/app/chat/chat-header/chat-header.component.html b/frontend/src/app/chat/chat-header/chat-header.component.html index c3aa3f79..d8abbf2b 100644 --- a/frontend/src/app/chat/chat-header/chat-header.component.html +++ b/frontend/src/app/chat/chat-header/chat-header.component.html @@ -1,9 +1,7 @@ - - Asset Chat - {{ chatId }} - - - \ No newline at end of file + + Asset Chat - {{ chatId }} + + + diff --git a/frontend/src/app/chat/chat-header/chat-header.component.spec.ts b/frontend/src/app/chat/chat-header/chat-header.component.spec.ts index 87907728..51a9e53f 100644 --- a/frontend/src/app/chat/chat-header/chat-header.component.spec.ts +++ b/frontend/src/app/chat/chat-header/chat-header.component.spec.ts @@ -8,9 +8,8 @@ describe('ChatHeaderComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ChatHeaderComponent ] - }) - .compileComponents(); + declarations: [ChatHeaderComponent], + }).compileComponents(); })); beforeEach(() => { diff --git a/frontend/src/app/chat/chat-header/chat-header.component.ts b/frontend/src/app/chat/chat-header/chat-header.component.ts index 81aa05b5..e8398c78 100644 --- a/frontend/src/app/chat/chat-header/chat-header.component.ts +++ b/frontend/src/app/chat/chat-header/chat-header.component.ts @@ -3,7 +3,7 @@ import { Component, Input } from '@angular/core'; @Component({ selector: 'app-chat-header', templateUrl: './chat-header.component.html', - styleUrls: ['./chat-header.component.scss'] + styleUrls: ['./chat-header.component.scss'], }) export class ChatHeaderComponent { @Input() chatId: string = ''; diff --git a/frontend/src/app/chat/chat-message/chat-message.component.html b/frontend/src/app/chat/chat-message/chat-message.component.html index 02e15877..a41275fd 100644 --- a/frontend/src/app/chat/chat-message/chat-message.component.html +++ b/frontend/src/app/chat/chat-message/chat-message.component.html @@ -1,4 +1,4 @@ -
+
{{ getDateDivider(msg) }} {{ getUserName(msg.user) }} - + -
+
{{ getCreatedDate(msg) }}
- {{ msg.content }} + {{ msg.content }}