Fix reset file server port with config web interface
This commit is contained in:
parent
635c3b27cd
commit
ddbd5c7b19
5 changed files with 33 additions and 12 deletions
|
@ -57,9 +57,8 @@ class UiConfig extends ZeroFrame
|
|||
for item, i in changed_values
|
||||
last = i == changed_values.length - 1
|
||||
value = @config_storage.deformatValue(item.value, typeof(@config[item.key].default))
|
||||
value_same_as_default = JSON.stringify(@config[item.key].default) == JSON.stringify(value)
|
||||
if value_same_as_default
|
||||
value = null
|
||||
default_value = @config_storage.deformatValue(@config[item.key].default, typeof(@config[item.key].default))
|
||||
value_same_as_default = JSON.stringify(default_value) == JSON.stringify(value)
|
||||
|
||||
if @config[item.key].item.valid_pattern and not @config[item.key].item.isHidden?()
|
||||
match = value.match(@config[item.key].item.valid_pattern)
|
||||
|
@ -69,6 +68,9 @@ class UiConfig extends ZeroFrame
|
|||
cb(false)
|
||||
break
|
||||
|
||||
if value_same_as_default
|
||||
value = null
|
||||
|
||||
@saveValue(item.key, value, if last then cb else null)
|
||||
|
||||
saveValue: (key, value, cb) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue