get, set, and clear blocks from localStorage

pull/1/head
ansuz 7 years ago
parent cb5fa72dba
commit 3ba0ad3cf1

@ -3,6 +3,7 @@ define(function () {
// localStorage // localStorage
userHashKey: 'User_hash', userHashKey: 'User_hash',
userNameKey: 'User_name', userNameKey: 'User_name',
blockHashKey: 'Block_hash',
fileHashKey: 'FS_hash', fileHashKey: 'FS_hash',
// sessionStorage // sessionStorage
newPadPathKey: "newPadPath", newPadPathKey: "newPadPath",

@ -58,6 +58,14 @@ define([
localStorage[Constants.userHashKey] = sHash; localStorage[Constants.userHashKey] = sHash;
}; };
LocalStore.getBlockHash = function () {
return localStorage[Constants.blockHashKey];
};
LocalStore.setBlockHash = function (hash) {
LocalStorage[Constants.blockHashKey] = hash;
};
LocalStore.getAccountName = function () { LocalStore.getAccountName = function () {
return localStorage[Constants.userNameKey]; return localStorage[Constants.userNameKey];
}; };
@ -96,6 +104,7 @@ define([
[ [
Constants.userNameKey, Constants.userNameKey,
Constants.userHashKey, Constants.userHashKey,
Constants.blockHashKey,
'loginToken', 'loginToken',
'plan', 'plan',
].forEach(function (k) { ].forEach(function (k) {

Loading…
Cancel
Save