parent
c5529958d5
commit
9ae814dfe4
21 changed files with 211 additions and 157 deletions
@ -1,28 +1,30 @@ |
|||||||
import actions from '../actions'; |
import actions from '../actions'; |
||||||
|
|
||||||
export function showCommand(text) { |
const showCommand = (text) => { |
||||||
return { |
return { |
||||||
type: actions.CONSOLE_SHOW_COMMAND, |
type: actions.CONSOLE_SHOW_COMMAND, |
||||||
text: text |
text: text |
||||||
}; |
}; |
||||||
} |
}; |
||||||
|
|
||||||
export function setCompletions(completions) { |
const setCompletions = (completions) => { |
||||||
return {
|
return { |
||||||
type: actions.CONSOLE_SET_COMPLETIONS, |
type: actions.CONSOLE_SET_COMPLETIONS, |
||||||
completions: completions |
completions: completions |
||||||
}; |
}; |
||||||
} |
}; |
||||||
|
|
||||||
export function showError(text) { |
const showError = (text) => { |
||||||
return { |
return { |
||||||
type: actions.CONSOLE_SHOW_ERROR, |
type: actions.CONSOLE_SHOW_ERROR, |
||||||
text: text |
text: text |
||||||
}; |
}; |
||||||
} |
}; |
||||||
|
|
||||||
export function hide() { |
const hide = () => { |
||||||
return {
|
return { |
||||||
type: actions.CONSOLE_HIDE |
type: actions.CONSOLE_HIDE |
||||||
}; |
}; |
||||||
} |
}; |
||||||
|
|
||||||
|
export { showCommand, setCompletions, showError, hide }; |
||||||
|
@ -1,15 +1,17 @@ |
|||||||
import actions from '../actions'; |
import actions from '../actions'; |
||||||
|
|
||||||
export function keyPress(code, ctrl) { |
const keyPress = (code, ctrl) => { |
||||||
return { |
return { |
||||||
type: actions.INPUT_KEY_PRESS, |
type: actions.INPUT_KEY_PRESS, |
||||||
code, |
code, |
||||||
ctrl |
ctrl |
||||||
}; |
}; |
||||||
} |
}; |
||||||
|
|
||||||
export function clearKeys() { |
const clearKeys = () => { |
||||||
return { |
return { |
||||||
type: actions.INPUT_CLEAR_KEYS |
type: actions.INPUT_CLEAR_KEYS |
||||||
} |
}; |
||||||
} |
}; |
||||||
|
|
||||||
|
export { keyPress, clearKeys }; |
||||||
|
@ -1,8 +1,8 @@ |
|||||||
const prev = (win) => { |
const prev = (win) => { |
||||||
win.history.back() |
win.history.back(); |
||||||
}; |
}; |
||||||
const next = (win) => { |
const next = (win) => { |
||||||
win.history.forward() |
win.history.forward(); |
||||||
}; |
}; |
||||||
|
|
||||||
export { prev, next }; |
export { prev, next }; |
||||||
|
Reference in new issue