Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer

This commit is contained in:
Peter Maquiran
2021-11-29 14:51:38 +01:00
2971 changed files with 108 additions and 1540018 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
<ion-header class="ion-no-border ">
<ion-header class="ion-no-border">
<app-header></app-header>
</ion-header>
<ion-header class="ion-no-border text-white">
<ion-header class="ion-no-border init-event-header">
<ion-label>
<p class="time ion-text-center">{{customDate}}</p>
</ion-label>
+1
View File
@@ -275,6 +275,7 @@ ion-toolbar{
// new
.main{
padding: 0px em(20px);
background: linear-gradient(270deg, var(--color2) 100%, var(--color3) 100%, var(--color4) 100%, var(--color5) 100%) !important;
}
.event-number{
+2 -2
View File
@@ -192,9 +192,9 @@ export class InactivityPage implements OnInit {
goback() {
const pathName = this.SessionStore.user.UrlBeforeInactivity
if(pathName) {
this.router.navigate([pathName]);
this.router.navigate([pathName],{replaceUrl: true});
} else {
this.router.navigate(['/home/events']);
this.router.navigate(['/home/events'], {replaceUrl: true});
}
}
@@ -19,6 +19,7 @@ import { ThemeService } from 'src/app/services/theme.service';
import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { NgxImageCompressService } from "ngx-image-compress";
const IMAGE_DIR = 'stored-images';
@@ -72,6 +73,9 @@ export class NewPublicationPage implements OnInit {
capturedImageTitle: any;
public photos: any[] = [];
imgResultBeforeCompress: string;
imgResultAfterCompress: string;
constructor(
private modalController: ModalController,
public photoService: PhotoService,
@@ -83,6 +87,7 @@ export class NewPublicationPage implements OnInit {
public ThemeService: ThemeService,
private platform: Platform,
private loadingCtrl: LoadingController,
public imageCompress: NgxImageCompressService
) {
this.publicationType = this.navParams.get('publicationType');
@@ -104,11 +109,11 @@ export class NewPublicationPage implements OnInit {
async takePicture() {
const image = await Camera.getPhoto({
quality: 50,
quality: 20,
allowEditing: false,
resultType: CameraResultType.Uri,
source: CameraSource.Camera // Camera, Photos or Prompt!
});
if (image) {
@@ -118,13 +123,13 @@ export class NewPublicationPage implements OnInit {
}
imageSize(image){
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
canvas.width=100
canvas.height=34
ctx.drawImage(image, 0, 0, 100, 34);
document.body.appendChild(canvas);
imageSize(image) {
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
canvas.width = 100
canvas.height = 34
ctx.drawImage(image, 0, 0, 100, 34);
document.body.appendChild(canvas);
}
convertBlobToBase64 = (blob: Blob) => new Promise((resolve, reject) => {
@@ -392,7 +397,7 @@ export class NewPublicationPage implements OnInit {
async selectImage() {
const image = await Camera.getPhoto({
quality: 50,
quality: 20,
allowEditing: false,
resultType: CameraResultType.Uri,
source: CameraSource.Camera // Camera, Photos or Prompt!
@@ -403,7 +408,7 @@ export class NewPublicationPage implements OnInit {
}
}
// Create a new file from a capture image
async saveImage(photo: Photo) {
@@ -492,12 +497,43 @@ export class NewPublicationPage implements OnInit {
this.capturedImage = this.images[0].data
this.compressFile();
loading.dismiss();
}
/* compressImage() {
let image = this.capturedImage;
this.imageCompress.compressFile(image, orientation, 50, 50,).then(() => {
this.imgResultBeforeCompress = image;
console.log('Size in bytes was:', this.imageCompress.byteCount(image));
this.imageCompress.compressFile(image, orientation, 50, 50).then(
result => {
this.imgResultAfterCompress = result;
console.log('Size in bytes is now:', this.imageCompress.byteCount(result));
}
);
})
} */
compressFile() {
//this.imgResultBeforeCompress = image;
this.imageCompress.getOrientation(this.capturedImage).then((orientation) => {
console.log('Size in bytes was:', this.imageCompress.byteCount(this.capturedImage));
this.imageCompress.compressFile(this.capturedImage, orientation, 20, 20).then(
result => {
this.capturedImage = result;
console.log('Size in bytes is now:', this.imageCompress.byteCount(result));
}
);
});
}
}
@@ -66,7 +66,7 @@
<ion-item-option class="edit-option" (click)="editAction(viagem.ProcessId)">
<button class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/cons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
</button>
</ion-item-option>