This commit is contained in:
Peter Maquiran
2022-02-10 16:14:25 +01:00
parent 9498ad0825
commit 115c76f1ff
9 changed files with 7 additions and 22 deletions
@@ -196,7 +196,7 @@
</div>
<div class="message-box width-80">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getGroupRoom(roomId).message" (ionChange)="changeInput()"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getGroupRoom(roomId).message" (ionChange)="wsChatMethodsService.getGroupRoom(roomId).sendTyping()"></ion-textarea>
<button hidden class="btn-no-color">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
@@ -198,10 +198,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
changeInput() {
this.wsChatMethodsService.getGroupRoom(this.roomId).typing()
}
async goToEvent(eventId: any) {
let classs;
if (window.innerWidth < 701) {
@@ -186,7 +186,7 @@
</div>
<div class="width-70">
<ion-item class="ion-no-padding ion-no-margin type-message" lines="none">
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" *ngIf="!recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="changeInput()"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" *ngIf="!recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
<ion-textarea autocomplete="on" spellcheck="true" *ngIf="recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="durationDisplay"></ion-textarea>
<button hidden #recordbtn class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
@@ -348,16 +348,10 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
window.removeEventListener('scroll', this.scrollChangeCallback, true);
}
changeInput() {
this.wsChatMethodsService.getDmRoom(this.roomId).typing()
}
sendMessage() {
this.wsChatMethodsService.getDmRoom(this.roomId).send({})
}
viewDocument(file: any, url?: string) {
if (file.type == "application/webtrix") {
+3 -2
View File
@@ -129,6 +129,7 @@ export class RoomService {
if(message.fields.eventName == this.id+'/'+'typing') {
this.userThatIsTyping = this.usernameToDisplayName(message.fields.args[0])
console.log(this.userThatIsTyping, 'this.userThatIsTyping')
this.isTyping = message.fields.args[1]
this.otherUserType = message.fields.args[1]
@@ -311,7 +312,7 @@ export class RoomService {
}
typing(text:string = this.message) {
sendTyping(text:string = this.message) {
if(this.lastMessageTxt == text) { return false }
this.lastTimeType = new Date().getTime()
@@ -351,7 +352,7 @@ export class RoomService {
}
private setTypingOff() {
this.typing('')
this.sendTyping('')
}
roomLeave() {
@@ -234,7 +234,7 @@
<div class="width-100">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getGroupRoom(roomId).message" (ionChange)="changeInput()"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getGroupRoom(roomId).message" (ionChange)="wsChatMethodsService.getGroupRoom(roomId).sendTyping()"></ion-textarea>
<button hidden class="btn-no-color">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
@@ -230,9 +230,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
}
changeInput() {
this.wsChatMethodsService.getDmRoom(this.roomId).typing()
}
async getChatMembers() {
//return await this.chatService.getMembers(roomId).toPromise();
@@ -215,7 +215,7 @@
<div class="width-100">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem"
class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="changeInput()"></ion-textarea>
class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
<button hidden class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
@@ -276,9 +276,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
}
changeInput() {
this.wsChatMethodsService.getDmRoom(this.roomId).typing()
}
async openViewDocumentModal(file: any) {
let task = {