mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Improve local storage
This commit is contained in:
@@ -4,6 +4,7 @@ import { BadRequestPage } from '../popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from '../popover/success-message/success-message.page';
|
||||
import crypto from 'crypto-js'
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
@Component({
|
||||
selector: 'app-pin',
|
||||
templateUrl: './pin.page.html',
|
||||
@@ -14,7 +15,8 @@ export class PinPage implements OnInit {
|
||||
code = []
|
||||
constructor( private modalController: ModalController,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService) { }
|
||||
private toastService: ToastService,
|
||||
private localstoreService: LocalstoreService) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
@@ -49,6 +51,7 @@ export class PinPage implements OnInit {
|
||||
const encrypted = crypto.SHA1(code)
|
||||
|
||||
localStorage.setItem('PIN', encrypted)
|
||||
this.localstoreService.set('PIN', encrypted)
|
||||
|
||||
} else {
|
||||
this.toastService.badRequest()
|
||||
|
||||
Reference in New Issue
Block a user