aboutsummaryrefslogtreecommitdiff
path: root/src/console/actions/console.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-08 15:19:25 +0900
committerGitHub <noreply@github.com>2017-10-08 15:19:25 +0900
commit0183161145d36cbafb7dbd86ca3a1aac6faca43f (patch)
treeaed757bfb5f8789156439d1e1fdff4e221376aaa /src/console/actions/console.js
parent0f54a203dba38acdd080a928cee95f875fe84706 (diff)
parent57f798044d32ba7f9dc10a34ac31ad5dbdbf56ae (diff)
Merge pull request #22 from ueokande/separate-domains
Refactor: Separate domains
Diffstat (limited to 'src/console/actions/console.js')
-rw-r--r--src/console/actions/console.js44
1 files changed, 44 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
+};