Login preference

This commit is contained in:
Peter Maquiran
2021-06-01 11:47:09 +01:00
parent 0f228da515
commit caf0fbbb8b
4 changed files with 49 additions and 11 deletions
+2 -2
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">
+16 -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)
}