This commit is contained in:
tiago.kayaya
2022-02-09 14:42:55 +01:00
16 changed files with 237 additions and 169 deletions
@@ -83,7 +83,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>
@@ -102,8 +102,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">
@@ -454,8 +454,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": capturedImage
"guid": ''
},
temporaryData: formData,
attachments: [{
@@ -533,8 +532,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.wsChatMethodsService.getDmRoom(this.roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": imageData
"guid": ''
},
temporaryData: formData,
attachments: [{
@@ -83,8 +83,8 @@
<div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments let i = index">
<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">
+2 -8
View File
@@ -540,8 +540,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": capturedImage
"guid": ''
},
attachments: [{
"image_url": capturedImage,
@@ -582,7 +581,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const roomId = this.roomId
if(data.selected) {
const loader = this.toastService.loading();
this.wsChatMethodsService.getDmRoom(roomId).send({
file:{
@@ -604,8 +602,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}],
})
loader.remove();
}
});
}
@@ -632,8 +628,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
"image_url": 'data:image/jpeg;base64,' +file.base64String
"guid": ''
},
temporaryData: formData,
attachments: [{
@@ -663,7 +658,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
file: {
"type": "application/img",
"guid": '',
"image_url": imageData
},
temporaryData: formData,
attachments: [{