summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/viewer.actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
-rw-r--r--animism-align/frontend/app/views/viewer/viewer.actions.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js
index 25a353f..10d6edd 100644
--- a/animism-align/frontend/app/views/viewer/viewer.actions.js
+++ b/animism-align/frontend/app/views/viewer/viewer.actions.js
@@ -226,7 +226,17 @@ export const hideComponent = key => dispatch => {
}
export const toggleComponent = key => dispatch => {
- dispatch({ type: types.viewer.toggle_component, key, value: !store.getState().viewer[key] })
+ const state = store.getState().viewer
+ if (key !== "share" && state.share) {
+ dispatch({ type: types.viewer.toggle_component, key: "share", value: false })
+ }
+ dispatch({ type: types.viewer.toggle_component, key, value: !state[key] })
+}
+
+export const openTranscript = () => dispatch => {
+ actions.viewer.hideComponent('checklist')
+ actions.viewer.hideComponent('share')
+ actions.viewer.toggleComponent('transcript')
}
export const reachedEndOfSection = currentSection => dispatch => {
@@ -255,6 +265,7 @@ export const seekToSection = section => dispatch => {
actions.audio.seek(section.start_ts)
actions.audio.play()
actions.viewer.hideComponent('nav')
+ actions.viewer.hideComponent('share')
}
export const seekToMediaItem = (section, mediaItem) => dispatch => {
@@ -263,6 +274,7 @@ export const seekToMediaItem = (section, mediaItem) => dispatch => {
actions.audio.play()
actions.viewer.hideComponent('nav')
actions.viewer.hideComponent('checklist')
+ actions.viewer.hideComponent('share')
}
export const seekToTimestamp = play_ts => dispatch => {