mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
pull from developer-prod made
This commit is contained in:
@@ -14,6 +14,7 @@ import { FilePicker } from '@capawesome/capacitor-file-picker';
|
||||
import { Directory, Encoding, Filesystem } from '@capacitor/filesystem';
|
||||
import { utf8Encode } from '@angular/compiler/src/util';
|
||||
import { checkFileTypeService } from 'src/app/services/checkFileType.service';
|
||||
import { FileValidatorService } from "src/app/services/file/file-validator.service"
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-publication',
|
||||
@@ -60,7 +61,8 @@ export class NewPublicationPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
public PublicationFolderService: PublicationFolderService,
|
||||
public checkFileType: checkFileTypeService
|
||||
public checkFileType: checkFileTypeService,
|
||||
private FileValidatorService: FileValidatorService
|
||||
) {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
|
||||
@@ -145,6 +147,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedImage = 'data:image/jpeg;base64,' + capturedImage.base64String;
|
||||
this.capturedImageTitle = 'foto';
|
||||
|
||||
/* if(validation.isOk) { */
|
||||
const compressedImage = await this.compressImageBase64(
|
||||
this.capturedImage,
|
||||
800, // maxWidth
|
||||
@@ -157,6 +160,9 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
this.seletedContent.push(fileObject)
|
||||
});
|
||||
/* } else {
|
||||
this.toastService._badRequest("Imagem inválida")
|
||||
} */
|
||||
}
|
||||
|
||||
async laodPicture() {
|
||||
@@ -211,6 +217,27 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
});
|
||||
|
||||
/* this.capturedImage = 'data:image/jpeg;base64,' +capturedImage.base64String;
|
||||
this.capturedImageTitle = 'foto';
|
||||
|
||||
|
||||
const validation = await this.FileValidatorService.ValidateImage(this.capturedImage)
|
||||
|
||||
if(validation.isOk) {
|
||||
|
||||
const compressedImage = await this.compressImageBase64(
|
||||
this.capturedImage,
|
||||
800, // maxWidth
|
||||
800, // maxHeight
|
||||
0.9 // quality
|
||||
).then((picture) => {
|
||||
console.log('Selected: ', picture)
|
||||
this.capturedImage = picture
|
||||
});
|
||||
} else {
|
||||
this.toastService._badRequest("Imagem inválida")
|
||||
} */
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -320,7 +347,6 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
} */
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
let time = new Date()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule,CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
@@ -31,6 +31,7 @@ setup(attributes: Attributes) {
|
||||
],
|
||||
exports: [ViewPublicationsPage],
|
||||
declarations: [ViewPublicationsPage],
|
||||
providers: [{provide: LAZYLOAD_IMAGE_HOOKS, useClass: LazyLoadImageHooks}]
|
||||
providers: [{provide: LAZYLOAD_IMAGE_HOOKS, useClass: LazyLoadImageHooks}],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
})
|
||||
export class ViewPublicationsPageModule {}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[foldserId]">
|
||||
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[folderId]">
|
||||
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||
|
||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
||||
|
||||
Reference in New Issue
Block a user