add setting actions in content
This commit is contained in:
parent
7639e99b75
commit
c6eb5553d0
10 changed files with 74 additions and 25 deletions
|
@ -1,12 +1,15 @@
|
|||
export default {
|
||||
// User input
|
||||
// Enable/disable
|
||||
ADDON_ENABLE: 'addon.enable',
|
||||
ADDON_DISABLE: 'addon.disable',
|
||||
ADDON_TOGGLE_ENABLED: 'addon.toggle.enabled',
|
||||
|
||||
// Settings
|
||||
SETTING_SET: 'setting.set',
|
||||
|
||||
// User input
|
||||
INPUT_KEY_PRESS: 'input.key,press',
|
||||
INPUT_CLEAR_KEYS: 'input.clear.keys',
|
||||
INPUT_SET_KEYMAPS: 'input.set.keymaps',
|
||||
|
||||
// Completion
|
||||
COMPLETION_SET_ITEMS: 'completion.set.items',
|
||||
|
|
|
@ -13,11 +13,4 @@ const clearKeys = () => {
|
|||
};
|
||||
};
|
||||
|
||||
const setKeymaps = (keymaps) => {
|
||||
return {
|
||||
type: actions.INPUT_SET_KEYMAPS,
|
||||
keymaps,
|
||||
};
|
||||
};
|
||||
|
||||
export { keyPress, clearKeys, setKeymaps };
|
||||
export { keyPress, clearKeys };
|
||||
|
|
10
src/content/actions/setting.js
Normal file
10
src/content/actions/setting.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import actions from 'content/actions';
|
||||
|
||||
const set = (value) => {
|
||||
return {
|
||||
type: actions.SETTING_SET,
|
||||
value,
|
||||
};
|
||||
};
|
||||
|
||||
export { set };
|
Reference in a new issue