mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
@@ -2,6 +2,8 @@ var $ = require('jquery');
|
|||||||
var vent = require('./vent');
|
var vent = require('./vent');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
ConfigNamespace : 'Radarr',
|
||||||
|
|
||||||
Events : {
|
Events : {
|
||||||
ConfigUpdatedEvent : 'ConfigUpdatedEvent'
|
ConfigUpdatedEvent : 'ConfigUpdatedEvent'
|
||||||
},
|
},
|
||||||
@@ -16,6 +18,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getValueJson : function (key, defaultValue) {
|
getValueJson : function (key, defaultValue) {
|
||||||
|
key = this.ConfigNamespace + key;
|
||||||
defaultValue = defaultValue || {};
|
defaultValue = defaultValue || {};
|
||||||
|
|
||||||
var storeValue = window.localStorage.getItem(key);
|
var storeValue = window.localStorage.getItem(key);
|
||||||
@@ -34,6 +37,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getValue : function(key, defaultValue) {
|
getValue : function(key, defaultValue) {
|
||||||
|
key = this.ConfigNamespace + key;
|
||||||
var storeValue = window.localStorage.getItem(key);
|
var storeValue = window.localStorage.getItem(key);
|
||||||
|
|
||||||
if (!storeValue) {
|
if (!storeValue) {
|
||||||
@@ -48,6 +52,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setValue : function(key, value) {
|
setValue : function(key, value) {
|
||||||
|
key = this.ConfigNamespace + key;
|
||||||
console.log('Config: [{0}] => [{1}]'.format(key, value));
|
console.log('Config: [{0}] => [{1}]'.format(key, value));
|
||||||
|
|
||||||
if (this.getValue(key) === value.toString()) {
|
if (this.getValue(key) === value.toString()) {
|
||||||
|
Reference in New Issue
Block a user