Skip to content

Commit

Permalink
change directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
noroadsleft committed Feb 11, 2020
1 parent 3ccb388 commit f5be88d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/store/modules/app/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ const actions = {
* load the default keymap for the currently selected keyboard
*/
loadDefaultKeymap({ state }) {
const keyboardPath = state.keyboard;
// eslint-disable-next-line
const keyboardName = state.keyboard.replace(/\//g, '_');
return axios.get(`keymaps/${keyboardName}_default.json`).then(r => {
if (r.status === 200) {
return r.data;
}
});
return axios
.get(`keymaps/${keyboardPath}/${keyboardName}_default.json`)
.then(r => {
if (r.status === 200) {
return r.data;
}
});
},
/**
* load keymap from the selected URL
Expand Down

0 comments on commit f5be88d

Please sign in to comment.