mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
header page footer
This commit is contained in:
@@ -41,7 +41,6 @@ import { Storage } from '@ionic/storage';
|
||||
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
|
||||
import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
|
||||
import { Plugins, Capacitor } from '@capacitor/core';
|
||||
import { MultipleDocumentsPicker } from '@awesome-cordova-plugins/multiple-document-picker/ngx';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { StringDecoder } from 'string_decoder';
|
||||
import { File } from '@awesome-cordova-plugins/file/ngx';
|
||||
@@ -135,13 +134,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private processesService: ProcessesService,
|
||||
private storage: Storage,
|
||||
private fileToBase64Service: FileToBase64Service,
|
||||
private multipleDocumentsPicker: MultipleDocumentsPicker,
|
||||
private sant: DomSanitizer,
|
||||
private file: File,
|
||||
private fileOpener: FileOpener,
|
||||
//private fileOpener: FileOpener,
|
||||
private sanitiser: DomSanitizer,
|
||||
private alertController: AlertController,
|
||||
private document: DocumentViewer
|
||||
// private document: DocumentViewer
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
@@ -151,7 +148,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (window.innerWidth > 701) {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
console.log(this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({}));
|
||||
|
||||
@@ -989,27 +986,27 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
openFile(pdfString, filename, type) {
|
||||
const blob = this.b64toBlob(pdfString, type)
|
||||
let pathFile = ''
|
||||
const fileName = filename
|
||||
const contentFile = blob
|
||||
if (this.platform.is('ios')) {
|
||||
pathFile = this.file.documentsDirectory
|
||||
} 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));
|
||||
})
|
||||
.catch(e => console.log('Error writing file', e))
|
||||
// const blob = this.b64toBlob(pdfString, type)
|
||||
// let pathFile = ''
|
||||
// const fileName = filename
|
||||
// const contentFile = blob
|
||||
// if (this.platform.is('ios')) {
|
||||
// pathFile = this.file.documentsDirectory
|
||||
// } 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));
|
||||
// })
|
||||
// .catch(e => console.log('Error writing file', e))
|
||||
}
|
||||
|
||||
downloadFileFromBrowser(fileName: string, data: any): void {
|
||||
|
||||
Reference in New Issue
Block a user