This commit is contained in:
tiago.kayaya
2021-06-01 13:27:47 +01:00
6 changed files with 80 additions and 20 deletions
+9 -4
View File
@@ -1,5 +1,5 @@
<ion-content class="text-white">
<div class="wrapper" *ngIf="pin ==false">
<div class="wrapper" *ngIf="userLoginPreference != 'pin' && userLoginPreference != 'fingerprint' && !setPint">
<div class="div-logo">
<img src='assets/images/logo-no-bg.png' alt='logo'>
</div>
@@ -17,7 +17,7 @@
</form>
</div>
<div class="main-content height-100" *ngIf="pin">
<div class="main-content height-100" *ngIf="userLoginPreference == 'pin' || setPint">
<div class=" align-center justify-center">
<div class="div-top-header">
@@ -55,9 +55,14 @@
</div>
<div class="voltar d-flex align-center justify-center pt-25 clear" (click)="pin=!pin">
Voltar
<div *ngIf="!setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="pin=!pin">
Entrar com senha
</div>
<div *ngIf="setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="pin=!pin">
Limpar
</div>
</div>
</div>
+17 -1
View File
@@ -37,6 +37,8 @@ export class LoginPage implements OnInit {
pin = localStorage.getItem('PIN') != null
userLoginPreference: any
constructor(
private http: HttpClient,
private notificatinsservice: NotificationsService,
@@ -48,7 +50,17 @@ export class LoginPage implements OnInit {
public alertController: AlertController,
private modalController: ModalController
//private fcm: FCM
) { }
) {
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
if (userData.hasOwnProperty('loginPreference')) {
this.userLoginPreference = userData.loginPreference
} else {
this.userLoginPreference = ''
}
}
ngOnInit() {}
@@ -60,6 +72,7 @@ export class LoginPage implements OnInit {
);
}
async presentAlert(message: string) {
const alert = await this.alertController.create({
cssClass: 'my-custom-class',
@@ -125,6 +138,8 @@ export class LoginPage implements OnInit {
}
setCode(code: string) {
if(this.code.length < 4) {
this.code.push(code)
}
@@ -163,6 +178,7 @@ export class LoginPage implements OnInit {
}
storePin() {
const code = this.code.join('')
const encrypted = crypto.SHA1(code)