mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Improve local storage
This commit is contained in:
@@ -38,7 +38,9 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
|
||||
// App has session
|
||||
if(!this.localstoreService.get('UserData', false)) {
|
||||
this.hasSession = false
|
||||
|
||||
@@ -6,10 +6,11 @@ import { AES, enc, SHA1 } from 'crypto-js'
|
||||
})
|
||||
export class LocalstoreService {
|
||||
|
||||
private prefix = 'v2-'
|
||||
private prefix = 'v0-'
|
||||
|
||||
constructor() {
|
||||
const key = SHA1('version').toString()
|
||||
const version = this.prefix.charAt(1)
|
||||
|
||||
if(this.get(key, false)) {
|
||||
// alert('new Update')
|
||||
|
||||
Reference in New Issue
Block a user