mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Remove relevant console log,
This commit is contained in:
@@ -39,7 +39,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
/*
|
||||
import * as pdfjsLib from 'pdfjs-dist';
|
||||
if( pdfjsLib !== undefined ){
|
||||
console.log( "set worker...");
|
||||
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = "https://npmcdn.com/pdfjs-dist@2.4.456/build/pdf.worker.js";
|
||||
}
|
||||
*/
|
||||
@@ -130,7 +130,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
|
||||
) {
|
||||
console.log('OnCONSTRUCTOR');
|
||||
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = true;
|
||||
this.roomCountDownDate = "";
|
||||
@@ -138,12 +138,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
console.log('OnCHANGES');
|
||||
|
||||
|
||||
this.getRoomInfo();
|
||||
//this.scrollToBottom();
|
||||
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
|
||||
// console.log('MESSAGES'+ this.wsChatMethodsService.getGroupRoom(this.roomId).messages);
|
||||
//
|
||||
this.wsChatMethodsService.openRoom(this.roomId)
|
||||
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||
|
||||
@@ -185,7 +185,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
status: status,
|
||||
}
|
||||
this.chatService.setUserStatus(body).subscribe(res => {
|
||||
//console.log(res);
|
||||
//
|
||||
})
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -320,13 +320,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
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;
|
||||
@@ -335,7 +335,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
//Save file
|
||||
this.storage.set('fileName', fileName);
|
||||
this.storage.set('recordData', result).then(() => {
|
||||
console.log('Audio recorded saved');
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -360,10 +360,10 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
async getChatMembers() {
|
||||
//return await this.chatService.getMembers(roomId).toPromise();
|
||||
this.chatService.getAllUsers().subscribe(res => {
|
||||
//console.log(res);
|
||||
//
|
||||
|
||||
this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
|
||||
//console.log(this.allUsers);
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
get watch() {
|
||||
this.getRoomInfo();
|
||||
console.log('here watching');
|
||||
|
||||
return this.roomId;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
//If group is private call getGroupMembers
|
||||
if (room.t === 'p') {
|
||||
this.chatService.getGroupMembers(this.roomId).subscribe(res => {
|
||||
//console.log(res);
|
||||
//
|
||||
this.members = res['members'];
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -422,7 +422,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
//Otherwise call getChannelMembers for públic groups
|
||||
else {
|
||||
this.chatService.getChannelMembers(this.roomId).subscribe(res => {
|
||||
console.log(res);
|
||||
|
||||
this.members = res['members'];
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -471,7 +471,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
//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);
|
||||
|
||||
@@ -535,7 +535,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
return await popover.present(); */
|
||||
|
||||
console.log(this.roomId);
|
||||
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
@@ -550,7 +550,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
|
||||
if (res.data == 'leave') {
|
||||
this.getRoomInfo();
|
||||
this.closeAllDesktopComponents.emit();
|
||||
@@ -562,16 +562,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
this.showEmptyContainer.emit();
|
||||
}
|
||||
else if (res.data == 'cancel') {
|
||||
console.log('CANCEL');
|
||||
|
||||
}
|
||||
else if (res.data == 'edit') {
|
||||
console.log(this.roomId);
|
||||
|
||||
//this.closeAllDesktopComponents.emit();
|
||||
this.openEditGroupPage.emit(this.roomId);
|
||||
}
|
||||
else {
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
console.log(this.roomName);
|
||||
|
||||
};
|
||||
|
||||
});
|
||||
@@ -579,11 +579,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
openSendGroupMessageOptions(ev?: any) {
|
||||
if (window.innerWidth <= 701) {
|
||||
console.log('mobile');
|
||||
|
||||
this.openChatOptions(ev);
|
||||
}
|
||||
else {
|
||||
console.log('desktop');
|
||||
|
||||
this._openChatOptions();
|
||||
}
|
||||
}
|
||||
@@ -601,7 +601,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
await popover.present();
|
||||
popover.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
|
||||
if (res.data) {
|
||||
//this.getRoomInfo();
|
||||
//this.modalController.dismiss();
|
||||
@@ -625,7 +625,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
}
|
||||
async addContacts() {
|
||||
console.log(this.members);
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
@@ -736,9 +736,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
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();
|
||||
@@ -852,9 +852,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
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();
|
||||
@@ -884,13 +884,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
const roomId = this.roomId
|
||||
|
||||
const file: any = await this.fileService.getFileFromDevice(types);
|
||||
console.log('Add file', 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);
|
||||
@@ -911,7 +911,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
})
|
||||
|
||||
} else {
|
||||
console.log('File type invalid')
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -931,7 +931,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
resolve(reader.result)
|
||||
};
|
||||
reader.onerror = function (error) {
|
||||
console.log('Error: ', error);
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
@@ -982,7 +982,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
console.log(res['data']);
|
||||
|
||||
const roomId = this.roomId;
|
||||
|
||||
if (res['data'] == 'meeting') {
|
||||
@@ -1066,18 +1066,18 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
} 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) {
|
||||
@@ -1117,7 +1117,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
|
||||
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 { }
|
||||
|
||||
Reference in New Issue
Block a user