summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/viewer.actions.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-10-12 19:43:38 +0200
committerJules Laplace <julescarbon@gmail.com>2020-10-12 19:43:38 +0200
commit7ed7efb524e7984e8e1ca0da77a882412a748174 (patch)
treee34d169f776d457bba564d4a6b040ee811347cb6 /animism-align/frontend/app/views/viewer/viewer.actions.js
parent9a8b3531c3141aae2a0e87f540144d86b741d21d (diff)
comments
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
-rw-r--r--animism-align/frontend/app/views/viewer/viewer.actions.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js
index b7490b5..d63ced5 100644
--- a/animism-align/frontend/app/views/viewer/viewer.actions.js
+++ b/animism-align/frontend/app/views/viewer/viewer.actions.js
@@ -15,7 +15,8 @@ import { buildParagraphs } from 'app/utils/transcript.utils'
import { annotationFadeTimings } from 'app/utils/annotation.utils'
import { getNextSection } from 'app/utils/viewer.utils'
-// build the list of sections from the raw annotation list.
+/* building the list of sections from the raw annotation list */
+
export const loadSections = () => dispatch => {
// list of all sections
let sections = []
@@ -209,6 +210,8 @@ const makeFullscreenEvent = (index, annotation) => {
return event
}
+/* nav UI */
+
export const setNavStyle = color => dispatch => {
dispatch({ type: types.viewer.set_nav_style, color })
}
@@ -250,6 +253,13 @@ export const openTranscript = () => dispatch => {
actions.viewer.toggleComponent('transcript')
}
+export const showCredits = () => dispatch => {
+ actions.viewer.closeGrowl()
+ actions.viewer.showComponent("credits")
+}
+
+/* section / seeking logic */
+
export const reachedEndOfSection = currentSection => dispatch => {
actions.audio.pause()
dispatch({ type: types.viewer.reached_end_of_section })
@@ -299,11 +309,6 @@ export const seekToBeginning = () => dispatch => {
actions.viewer.seekToTimestamp(0.0)
}
-export const showCredits = () => dispatch => {
- actions.viewer.closeGrowl()
- actions.viewer.showComponent("credits")
-}
-
export const setSectionFromTimestamp = play_ts => dispatch => {
const { sections, currentSection } = store.getState().viewer
const insideSection = sections.some((section, i) => {
@@ -321,6 +326,8 @@ export const setSectionFromTimestamp = play_ts => dispatch => {
}
}
+/* vitrine modal */
+
export const openVitrineModal = (media, color, id) => dispatch => {
console.log(media)
const index = media.settings.image_order.indexOf(id)
@@ -342,7 +349,6 @@ export const vitrineGo = direction => dispatch => {
} else {
actions.viewer.setVitrineIndex(targetIndex)
}
-
}
export const openGrowl = message => dispatch => {