load keymaps from storage
This commit is contained in:
parent
8ba490ea11
commit
e97ffafea3
7 changed files with 85 additions and 51 deletions
|
@ -2,6 +2,7 @@ import actions from '../actions';
|
|||
|
||||
const defaultState = {
|
||||
keys: [],
|
||||
keymaps: {}
|
||||
};
|
||||
|
||||
export default function reducer(state = defaultState, action = {}) {
|
||||
|
@ -19,6 +20,11 @@ export default function reducer(state = defaultState, action = {}) {
|
|||
return Object.assign({}, state, {
|
||||
keys: [],
|
||||
});
|
||||
case actions.INPUT_SET_KEYMAPS:
|
||||
return Object.assign({}, state, {
|
||||
keymaps: action.keymaps,
|
||||
keys: [],
|
||||
});
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
|
Reference in a new issue