2021-05-28 06:33:30 +01:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2021-06-08 15:59:06 +01:00
|
|
|
import { AnimationController, ModalController } from '@ionic/angular';
|
|
|
|
|
import { BadRequestPage } from '../popover/bad-request/bad-request.page';
|
|
|
|
|
import { SuccessMessagePage } from '../popover/success-message/success-message.page';
|
2022-04-26 16:53:10 +01:00
|
|
|
|
2021-05-28 06:33:30 +01:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-fingerprint',
|
|
|
|
|
templateUrl: './fingerprint.page.html',
|
|
|
|
|
styleUrls: ['./fingerprint.page.scss'],
|
|
|
|
|
})
|
|
|
|
|
export class FingerprintPage implements OnInit {
|
|
|
|
|
|
|
|
|
|
constructor( private modalController: ModalController,
|
2021-05-28 07:52:16 +01:00
|
|
|
//private faio: FingerprintAIO
|
2021-06-08 15:59:06 +01:00
|
|
|
private animationController: AnimationController
|
2021-05-28 07:52:16 +01:00
|
|
|
) {
|
2021-05-28 06:33:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
login() {
|
2021-05-28 14:41:56 +01:00
|
|
|
|
|
|
|
|
// this.faio.show({
|
|
|
|
|
// clientId: 'Fingerprint-Demo',
|
|
|
|
|
// clientSecret: 'password', //Only necessary for Android
|
|
|
|
|
// disableBackup:true, //Only for Android(optional)
|
|
|
|
|
// localizedFallbackTitle: 'Use Pin', //Only for iOS
|
|
|
|
|
// localizedReason: 'Please authenticate' //Only for iOS
|
|
|
|
|
// })
|
|
|
|
|
// .then((FingerPrintHash: any) => {
|
|
|
|
|
// console.log(FingerPrintHash)
|
|
|
|
|
|
|
|
|
|
// const storedFinderPrint = localStorage.getItem('FingerPrintHash')
|
|
|
|
|
// if(FingerPrintHash == storedFinderPrint) {
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
// .catch((error: any) => {
|
|
|
|
|
// console.log(error)
|
|
|
|
|
// });
|
2021-05-28 06:33:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
close() {
|
|
|
|
|
/* console.log(this.isEventEdited); */
|
|
|
|
|
this.modalController.dismiss();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async save() {
|
|
|
|
|
|
2021-05-28 07:52:16 +01:00
|
|
|
// this.faio.show({
|
|
|
|
|
// clientId: 'Fingerprint-Demo',
|
|
|
|
|
// clientSecret: 'password', //Only necessary for Android
|
|
|
|
|
// disableBackup:true, //Only for Android(optional)
|
|
|
|
|
// localizedFallbackTitle: 'Use Pin', //Only for iOS
|
|
|
|
|
// localizedReason: 'Please authenticate' //Only for iOS
|
|
|
|
|
// })
|
|
|
|
|
// .then((FingerPrintHash: any) => {
|
2021-05-28 14:41:56 +01:00
|
|
|
|
2021-06-15 15:09:20 +01:00
|
|
|
// this.toastService.successMessage()
|
2021-05-28 07:52:16 +01:00
|
|
|
// localStorage.setItem('FingerPrintHash', FingerPrintHash)
|
2021-05-28 14:41:56 +01:00
|
|
|
|
2021-05-28 07:52:16 +01:00
|
|
|
// })
|
|
|
|
|
// .catch((error: any) => {
|
2021-06-15 15:09:20 +01:00
|
|
|
// this.toastService.badRequest()
|
2021-05-28 07:52:16 +01:00
|
|
|
// });
|
2021-05-28 06:33:30 +01:00
|
|
|
|
2021-06-08 11:24:01 +01:00
|
|
|
}
|
2021-05-28 06:33:30 +01:00
|
|
|
|
|
|
|
|
}
|