get, set, and clear blocks from localStorage
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user