diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-04 16:37:19 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-04 16:37:19 +0200 |
| commit | e973412b5ea29685f4fa260d8eb44baae095fb81 (patch) | |
| tree | 0e859ab0541187ed769e654663730834b998f3d1 /animism-align/frontend/views/align/align.actions.js | |
| parent | 3e1c6f81bbdad758b8756955fce82da49a564611 (diff) | |
rename timestamp to annotation
Diffstat (limited to 'animism-align/frontend/views/align/align.actions.js')
| -rw-r--r-- | animism-align/frontend/views/align/align.actions.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/animism-align/frontend/views/align/align.actions.js b/animism-align/frontend/views/align/align.actions.js index 82e4799..b3883ae 100644 --- a/animism-align/frontend/views/align/align.actions.js +++ b/animism-align/frontend/views/align/align.actions.js @@ -25,7 +25,7 @@ export const setCursor = cursor_ts => dispatch => ( dispatch({ type: types.align.set_display_setting, key: 'cursor_ts', value: cursor_ts }) ) -export const showNewTimestampForm = (start_ts, text) => dispatch => { +export const showNewAnnotationForm = (start_ts, text) => dispatch => { let croppedText; if (store.getState().align.annotation.start_ts) { croppedText = store.getState().align.annotation.text @@ -44,6 +44,13 @@ export const showNewTimestampForm = (start_ts, text) => dispatch => { }) } +export const updateAnnotationForm = (key, value) => dispatch => { + dispatch({ type: types.align.update_temporary_annotation, key, value }) +} +export const updateAnnotationSettings = (key, value) => dispatch => { + dispatch({ type: types.align.update_temporary_annotation_settings, key, value }) +} + const cutFirstSentence = text => { const textToCrop = text.trim().replace("\n", " ").split("\n")[0] let cropIndex = textToCrop.indexOf('. ') + 1 @@ -54,7 +61,7 @@ const cutFirstSentence = text => { return croppedText } -export const hideTimestampForm = () => dispatch => { +export const hideAnnotationForm = () => dispatch => { dispatch({ type: types.align.set_temporary_annotation, data: {} |
