diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-11 13:02:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 13:02:14 +0000 |
commit | f5dfdb0bd7ab850c77cae523928c876fe5e002fa (patch) | |
tree | 083a7c9dcd4e85daef7f8323067454b48730c6e6 /src/shared/settings/values.js | |
parent | c3d1535224231cd379cf503a4c4937342ef27383 (diff) | |
parent | fad8f96a663d83792138cc986474ec4228b6c6c9 (diff) |
Merge pull request #303 from ueokande/properties
Properties support
Diffstat (limited to 'src/shared/settings/values.js')
-rw-r--r-- | src/shared/settings/values.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/shared/settings/values.js b/src/shared/settings/values.js index 4e55fa0..bd03be2 100644 --- a/src/shared/settings/values.js +++ b/src/shared/settings/values.js @@ -1,3 +1,5 @@ +import * as properties from './properties'; + const operationFromFormName = (name) => { let [type, argStr] = name.split('?'); let args = {}; @@ -44,9 +46,12 @@ const valueFromForm = (form) => { } } - let blacklist = form.blacklist; - - return { keymaps, search, blacklist }; + return { + keymaps, + search, + blacklist: form.blacklist, + properties: form.properties + }; }; const jsonFromValue = (value) => { @@ -78,9 +83,14 @@ const formFromValue = (value, allowedOps) => { } } - let blacklist = value.blacklist; + let formProperties = Object.assign({}, properties.defaults, value.properties); - return { keymaps, search, blacklist }; + return { + keymaps, + search, + blacklist: value.blacklist, + properties: formProperties, + }; }; const jsonFromForm = (form) => { |