This commit is contained in:
Eudes Inácio
2022-02-09 14:42:59 +01:00
16 changed files with 237 additions and 169 deletions
@@ -78,8 +78,8 @@
<div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments">
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)">
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image">
<ion-icon *ngIf="msg.file.image_url == null" name="download-outline"></ion-icon>
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon>
</div>
<div *ngIf="msg.file.type != 'application/img'">
<div class="file">
@@ -133,7 +133,7 @@
<div *ngIf="msg.file" class="message-attachments">
<div>
<div (click)="openPreview(msg)">
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image">
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
</div>
</div>
</div>
@@ -558,8 +558,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": capturedImage
"guid": ''
},
attachments: [{
"title": capturedImageTitle ,
@@ -642,8 +641,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": imageData
"guid": ''
},
temporaryData: formData,
attachments: [{
@@ -67,14 +67,14 @@
</mat-menu>
</div>
<div class="title">
<ion-label>{{msg.u.name}} </ion-label>
<ion-label>{{msg.u.name}} </ion-label>
<span class="time">{{showDateDuration(msg.duration)}}</span>
</div>
<div>
<div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments">
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)">
<img src={{msg.file.image_url}} alt="image">
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)" dfsdvsvs>
<img src={{msg.attachments[0].image_url}} alt="image">
</div>
<div *ngIf="msg.file.type != 'application/img'">
<div class="file">
@@ -142,7 +142,7 @@
<div>
<div (click)="openPreview(msg)">
File
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image">
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
</div>
</div>
</div>
@@ -277,7 +277,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
}
changeInput() {
this.wsChatMethodsService.getDmRoom(this.roomId).typing()
}
@@ -466,7 +465,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
file: {
"type": "application/img",
"guid": '',
"image_url": 'data:image/jpeg;base64,' +file.base64String
},
temporaryData: formData,
attachments: [{
@@ -497,8 +495,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": capturedImage
"guid": ''
},
temporaryData: formData,
attachments: [{
@@ -583,8 +580,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": 'data:image/jpeg;base64,' +file.base64String
"guid": ''
},
temporaryData: formData,
attachments: [{
@@ -614,7 +610,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
file: {
"type": "application/img",
"guid": '',
"image_url": imageData, // GPR
},
attachments: [{
"title": file.name ,