From bf283c732ef9424d365ca1b09ce8b174f61c336c Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Thu, 11 Oct 2018 15:00:50 +0900 Subject: Add mark action and reducer --- src/content/actions/index.js | 6 ++++++ src/content/actions/mark.js | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/content/actions/mark.js (limited to 'src/content/actions') diff --git a/src/content/actions/index.js b/src/content/actions/index.js index 6976df7..0a16fdf 100644 --- a/src/content/actions/index.js +++ b/src/content/actions/index.js @@ -22,4 +22,10 @@ export default { // Find FIND_SET_KEYWORD: 'find.set.keyword', + + // Mark + MARK_START_SET: 'mark.start.set', + MARK_START_JUMP: 'mark.start.jump', + MARK_CANCEL: 'mark.cancel', + MARK_SET_LOCAL: 'mark.set.local', }; diff --git a/src/content/actions/mark.js b/src/content/actions/mark.js new file mode 100644 index 0000000..baf5825 --- /dev/null +++ b/src/content/actions/mark.js @@ -0,0 +1,25 @@ +import actions from 'content/actions'; + +const startSet = () => { + return { type: actions.MARK_START_SET }; +}; + +const startJump = () => { + return { type: actions.MARK_START_JUMP }; +}; + +const cancel = () => { + return { type: actions.MARK_CANCEL }; +}; + +const setLocal = (key, y) => { + return { + type: actions.MARK_SET_LOCAL, + key, + y, + }; +}; + +export { + startSet, startJump, cancel, setLocal, +}; -- cgit v1.2.3