aboutsummaryrefslogtreecommitdiff
path: root/src/console/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/actions')
-rw-r--r--src/console/actions/console.js44
-rw-r--r--src/console/actions/index.js9
2 files changed, 53 insertions, 0 deletions
diff --git a/src/console/actions/console.js b/src/console/actions/console.js
new file mode 100644
index 0000000..01d9a9b
--- /dev/null
+++ b/src/console/actions/console.js
@@ -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
+};
diff --git a/src/console/actions/index.js b/src/console/actions/index.js
new file mode 100644
index 0000000..a5d03bc
--- /dev/null
+++ b/src/console/actions/index.js
@@ -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',
+};