remove publication mobile

This commit is contained in:
Peter Maquiran
2024-03-11 10:23:33 +01:00
parent b02971e70b
commit e87b4ccdef
9 changed files with 42 additions and 22 deletions
+12 -2
View File
@@ -144,8 +144,18 @@ export class LoginPage implements OnInit {
if (attempt.ChatData) {
await this.authService.loginToChatWs();
this.ChatService.setheader()
try {
await MessageModel.deleteAll();
await DeleteMessageModel.deleteAll();
this.ChatSystemService.clearChat();
this.NotificationHolderService.clear()
await this.authService.loginToChatWs();
this.ChatService.setheader()
} catch(error) {
console.log("faild to clear chat")
}
}
@@ -40,7 +40,7 @@
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'" [(ngModel)]="capturedImage"
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64"
name="image" ngDefaultControl [src]="seleted.FileBase64"
(click)="imageSize(capturedImage)" style="height: 69px;"></ion-img>
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
@@ -758,7 +758,7 @@ console.log(stringGerada);
this.shareContentAndroid(resultUrl,FileExtension)
}
/*
/*
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
let fileObject;
try {
@@ -809,7 +809,7 @@ console.log(stringGerada);
} else {
window["sharedContent"] = null
}
}
async recordevideoIos(fullPath) {
@@ -854,7 +854,7 @@ console.log(stringGerada);
.catch((erro) => console.error('read converted video erro ', erro));
});
} catch (error) {
console.log('record video ios erro, ', error)
}
@@ -906,7 +906,7 @@ console.log(stringGerada);
}
} else {
fileObject = {
FileBase64: content.data,
FileBase64: 'data:image/jpeg;base64,' + content.data,
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
OriginalFileName: 'image'
}
@@ -915,18 +915,18 @@ console.log(stringGerada);
this.seletedContent.push(fileObject)
})
.catch((err) => console.error(err));
}
gerarStringAleatoria() {
const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let stringAleatoria = '';
for (let i = 0; i < 4; i++) {
const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
stringAleatoria += caracteres.charAt(indiceAleatorio);
}
return stringAleatoria;
}
@@ -944,23 +944,23 @@ console.log(stringGerada);
OriginalFileName: 'shared',
}
console.log('shared base', content.data)
this.seletedContent.push(fileObject)
} catch (error) {
console.log('error shared filesystem', error)
}
})
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
const directory = await Filesystem.getUri({
directory: Directory.Cache,
path: '',
});
let fileObject ={};
this.videoconvertService.convertVideo(fullPath,directory.uri,filename,'mp4').then(() => {
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
.then(async (content) => {
console.log(content.data)
this.filecontent = true;
@@ -991,8 +991,8 @@ console.log(stringGerada);
});
}
} catch (error) {
console.log('record video ios erro, ', error)
}
@@ -1005,7 +1005,7 @@ console.log(stringGerada);
try {
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
fileObject = {
FileBase64: this.removeTextBeforeSlash(content.data, ','),
FileBase64: 'data:image/jpeg;base64,' +this.removeTextBeforeSlash(content.data, ','),
FileExtension: FileExtension,
OriginalFileName: 'shared',
}