mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Fixe
This commit is contained in:
@@ -31,15 +31,19 @@
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div (click)="addPin()">
|
||||
<div (click)="addPin()" class="d-flex align-center">
|
||||
<ion-checkbox class="checkBox"></ion-checkbox>
|
||||
PIN
|
||||
</div>
|
||||
|
||||
</ion-col>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div (click)="addFingerprint()" class="d-flex align-center">
|
||||
<ion-checkbox class="checkBox"></ion-checkbox>
|
||||
Impressão Digital
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col class="align-center d-flex">
|
||||
<ion-checkbox class="checkBox"></ion-checkbox>
|
||||
PIN
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
|
||||
import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
|
||||
@Component({
|
||||
@@ -66,4 +67,42 @@ export class ProfileComponent implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async addFingerprint() {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: FingerprintPage,
|
||||
cssClass: 'model profile-modal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
|
||||
modal.present();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user