separate console
This commit is contained in:
parent
22db12f2a3
commit
541449b1fc
13 changed files with 38 additions and 40 deletions
44
src/console/actions/console.js
Normal file
44
src/console/actions/console.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import actions from 'console/actions';
|
||||
|
||||
const showCommand = (text) => {
|
||||
return {
|
||||
type: actions.CONSOLE_SHOW_COMMAND,
|
||||
text: 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,
|
||||
completions: completions
|
||||
};
|
||||
};
|
||||
|
||||
const completionNext = () => {
|
||||
return {
|
||||
type: actions.CONSOLE_COMPLETION_NEXT,
|
||||
};
|
||||
};
|
||||
|
||||
const completionPrev = () => {
|
||||
return {
|
||||
type: actions.CONSOLE_COMPLETION_PREV,
|
||||
};
|
||||
};
|
||||
|
||||
export {
|
||||
showCommand, showError, hide, setCompletions, completionNext, completionPrev
|
||||
};
|
9
src/console/actions/index.js
Normal file
9
src/console/actions/index.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
export default {
|
||||
// console commands
|
||||
CONSOLE_SHOW_COMMAND: 'console.show.command',
|
||||
CONSOLE_SET_COMPLETIONS: 'console.set.completions',
|
||||
CONSOLE_SHOW_ERROR: 'console.show.error',
|
||||
CONSOLE_HIDE: 'console.hide',
|
||||
CONSOLE_COMPLETION_NEXT: 'console.completion.next',
|
||||
CONSOLE_COMPLETION_PREV: 'console.completion.prev',
|
||||
};
|
Reference in a new issue