Remove relevant console log,

This commit is contained in:
Eudes Inácio
2022-04-28 09:32:27 +01:00
parent 3021e8b0e1
commit 2826cea9df
153 changed files with 1001 additions and 1132 deletions
+39 -39
View File
@@ -142,13 +142,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
async checkAudioPermission() {
const permissionStatus = await navigator.permissions.query({ name: 'microphone' } as any)
console.log('permission', permissionStatus.state); // granted, denied, prompt
this.audioPermissionStatus = permissionStatus.state
permissionStatus.onchange = (data : any) => {
// console.log("Permission changed to " + data.state);
// console.log('permission', permissionStatus.state); // granted, denied, prompt
//
//
}
}
@@ -169,11 +169,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
gestureName: 'long-press',
onStart: ev => {
this.longPressActive = true;
console.log('Pressing');
},
onEnd: ev => {
this.longPressActive = false;
console.log('Stop pressing');
}
});
}
@@ -310,13 +310,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
stopRecording() {
this.deleteRecording();
this.allowTyping = false;
console.log('Stop');
if (!this.recording) {
return;
}
this.recording = false;
VoiceRecorder.stopRecording().then(async (result: RecordingData) => {
console.log(result);
this.recording = false;
if (result.value && result.value.recordDataBase64) {
const recordData = result.value.recordDataBase64;
@@ -325,7 +325,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
//Save file
this.storage.set('fileName', fileName);
this.storage.set('recordData', result).then(() => {
console.log('Audio recorded saved');
})
}
})
@@ -376,7 +376,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
});
await modal.present();
modal.onDidDismiss().then((res) => {
console.log(res);
});
}
@@ -401,7 +401,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
//Converting base64 to blob
const encodedData = btoa(this.audioRecorded);
const blob = this.base64toBlob(encodedData, recordData.value.mimeType)
console.log(blob)
const formData = new FormData();
formData.append("blobFile", blob);
@@ -430,7 +430,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.openViewDocumentModal(msg.file);
}
else {
console.log('PDF CLICK', msg)
var str = msg.attachments[0].image_url;
str = str.substring(1, ((str.length) - 1));
@@ -442,7 +442,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.frameUrl = fullUrl; */
let file = this.base64toBlob(encodedData, 'application/pdf')
let fileURL = URL.createObjectURL(file)
console.log('PDF CLICK', fileURL)
window.open(fileURL);
// this.chatService.getDocumentDetails(fullUrl);
@@ -521,7 +521,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
getChatMembers() {
// console.log(this.roomId);
//
//this.showLoader = true;
this.chatService.getMembers(this.roomId).subscribe(res => {
@@ -559,11 +559,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
openSendMessageOptions(ev?: any) {
if (window.innerWidth < 701) {
console.log('mobile');
this.openChatOptions(ev);
}
else {
console.log('desktop');
this._openChatOptions();
}
}
@@ -639,9 +639,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
resultType: CameraResultType.Base64,
source: CameraSource.Camera
});
console.log('ADDFILECHAT', file)
//const imageData = await this.fileToBase64Service.convert(file)
//console.log('ADDFILECHAT', imageData)
//
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
const blob = await response.blob();
@@ -674,12 +674,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const lastphoto: any = await this.fileService.loadFiles();
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
const base64 = await fetch(capturedImage);
console.log('imsge take picture', image)
const blob = await base64.blob();
const formData = new FormData();
formData.append("blobFile", blob);
console.log('formData', formData)
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
@@ -717,7 +717,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
});
await modal.present();
modal.onDidDismiss().then(async res => {
console.log('webTrix ', res.data)
const data = res.data;
const roomId = this.roomId
@@ -756,9 +756,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
resultType: CameraResultType.Base64,
source: CameraSource.Photos
});
console.log('ADDFILECHAT', file)
//const imageData = await this.fileToBase64Service.convert(file)
//console.log('ADDFILECHAT', imageData)
//
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
const blob = await response.blob();
@@ -792,17 +792,17 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
//if (file.type == "application/pdf") {
console.log('Add file', file)
/* const imageData = await this.fileToBase64Service.convert(file).then((filee) => {
console.log('Add file', filee)
}) */
console.log('Add file', JSON.stringify(await this.getBase64(file)))
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
const encodedData = btoa(JSON.stringify(await this.getBase64(file)));
const blob = this.base64toBlob(encodedData, file.type)
console.log('Add Blob file', blob)
const formData = new FormData();
formData.append("blobFile", blob);
@@ -823,7 +823,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
})
} else {
console.log('File type invalid')
}
@@ -843,7 +843,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
resolve(reader.result)
};
reader.onerror = function (error) {
console.log('Error: ', error);
};
});
@@ -902,7 +902,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
});
await modal.present();
modal.onDidDismiss().then(async (res) => {
console.log(res['data']);
if (res['data'] == 'meeting') {
@@ -953,7 +953,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async audioPreview(msg) {
console.log(msg);
if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') {
this.downloadFileMsg(msg)
} else { }
@@ -993,7 +993,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
viewDocument(file: any, url?: string) {
console.log()
if (file.type == "application/webtrix") {
this.openViewDocumentModal(file);
}
@@ -1013,22 +1013,22 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
} else {
pathFile = this.file.externalRootDirectory
}
console.log(pdfString)
console.log(pathFile)
console.log(contentFile)
this.file
.writeFile(pathFile, fileName, contentFile, { replace: true })
.then(success => {
this.fileOpener
.open(pathFile + fileName, type)
.then(() => console.log('File is opened'))
.catch(e => console.log('Error opening file', e));
.then(() => {})
.catch(e => console.error(e))
})
.catch(e => console.log('Error writing file', e))
.catch(e => console.error(e))
}
async openPreview(msg) {
console.log(msg);
if(msg.file.type === "application/webtrix") {
this.viewDocument(msg.file, msg.attachments.image_url)
@@ -1041,7 +1041,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
/* } else if (msg.file.type === "application/pdf") {
console.log(str);
const win = window.open("", "_blank");
let html = '';