mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Store last 5 used folders from manual import
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user