diff options
Diffstat (limited to 'src/actions/console.js')
-rw-r--r-- | src/actions/console.js | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/actions/console.js b/src/actions/console.js index e0ec631..4183489 100644 --- a/src/actions/console.js +++ b/src/actions/console.js @@ -1,4 +1,4 @@ -import actions from '../actions'; +import actions from 'actions'; const showCommand = (text) => { return { @@ -7,6 +7,19 @@ const showCommand = (text) => { }; }; +const showError = (text) => { + return { + type: actions.CONSOLE_SHOW_ERROR, + text: text + }; +}; + +const hide = () => { + return { + type: actions.CONSOLE_HIDE + }; +}; + const setCompletions = (completions) => { return { type: actions.CONSOLE_SET_COMPLETIONS, @@ -14,17 +27,18 @@ const setCompletions = (completions) => { }; }; -const showError = (text) => { +const completionNext = () => { return { - type: actions.CONSOLE_SHOW_ERROR, - text: text + type: actions.CONSOLE_COMPLETION_NEXT, }; }; -const hide = () => { +const completionPrev = () => { return { - type: actions.CONSOLE_HIDE + type: actions.CONSOLE_COMPLETION_PREV, }; }; -export { showCommand, setCompletions, showError, hide }; +export { + showCommand, showError, hide, setCompletions, completionNext, completionPrev +}; |