New: Store last 5 used folders from manual import

This commit is contained in:
Mark McDowall
2015-05-17 16:07:27 -07:00
parent f1a5261e0a
commit f57dea7f1f
6 changed files with 95 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
var $ = require('jquery');
var vent = require('./vent');
module.exports = {
@@ -14,6 +15,18 @@ module.exports = {
AdvancedSettings : 'advancedSettings'
},
getValueJson : function (key, defaultValue) {
defaultValue = defaultValue || {};
var storeValue = window.localStorage.getItem(key);
if (!storeValue) {
return defaultValue;
}
return $.parseJSON(storeValue);
},
getValueBoolean : function(key, defaultValue) {
defaultValue = defaultValue || false;
@@ -30,6 +43,10 @@ module.exports = {
return storeValue.toString();
},
setValueJson : function(key, value) {
return this.setValue(key, JSON.stringify(value));
},
setValue : function(key, value) {
console.log('Config: [{0}] => [{1}]'.format(key, value));