Try to move perstisting to stores
This commit is contained in:
@ -48,6 +48,11 @@ export const useSessionStore = defineStore('session', {
|
||||
},
|
||||
logout() {
|
||||
this.$reset()
|
||||
},
|
||||
restoreFromLocalStorage() {
|
||||
const json = localStorage.getItem("session");
|
||||
const value = JSON.parse(json || "{}");
|
||||
Object.assign(this, value);
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user