aboutsummaryrefslogtreecommitdiff
path: root/src/background/actions/setting.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-01-11 13:02:14 +0000
committerGitHub <noreply@github.com>2018-01-11 13:02:14 +0000
commitf5dfdb0bd7ab850c77cae523928c876fe5e002fa (patch)
tree083a7c9dcd4e85daef7f8323067454b48730c6e6 /src/background/actions/setting.js
parentc3d1535224231cd379cf503a4c4937342ef27383 (diff)
parentfad8f96a663d83792138cc986474ec4228b6c6c9 (diff)
Merge pull request #303 from ueokande/properties
Properties support
Diffstat (limited to 'src/background/actions/setting.js')
-rw-r--r--src/background/actions/setting.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/background/actions/setting.js b/src/background/actions/setting.js
new file mode 100644
index 0000000..773142f
--- /dev/null
+++ b/src/background/actions/setting.js
@@ -0,0 +1,21 @@
+import actions from '../actions';
+import * as settingsStorage from 'shared/settings/storage';
+
+const load = () => {
+ return settingsStorage.loadValue().then((value) => {
+ return {
+ type: actions.SETTING_SET_SETTINGS,
+ value,
+ };
+ });
+};
+
+const setProperty = (name, value) => {
+ return {
+ type: actions.SETTING_SET_PROPERTY,
+ name,
+ value,
+ };
+};
+
+export { load, setProperty };