diff options
Diffstat (limited to 'animism-align/frontend/app/constants.js')
| -rw-r--r-- | animism-align/frontend/app/constants.js | 65 |
1 files changed, 53 insertions, 12 deletions
diff --git a/animism-align/frontend/app/constants.js b/animism-align/frontend/app/constants.js index 8655c3a..db3d666 100644 --- a/animism-align/frontend/app/constants.js +++ b/animism-align/frontend/app/constants.js @@ -1,4 +1,4 @@ -import { capitalize } from 'app/utils' +import { mapNameToSelectOption } from 'app/utils' export const { NODE_ENV } = process.env export const ENV_DEVELOPMENT = NODE_ENV !== 'production' @@ -55,19 +55,60 @@ export const ROMAN_NUMERALS = [ ] export const ANNOTATION_SELECT_LABELS = { - 'section_heading': 'Chapter Heading', + 'section_heading': 'Chapter Title', + 'heading_text': 'Heading', + 'video_set_volume': '(cue) Set Volume', + 'gallery_advance': '(cue) Advance Frame', } +const mapNameToAnnotationFunction = mapNameToSelectOption(ANNOTATION_SELECT_LABELS) + export const ANNOTATION_SELECT_OPTIONS = [ - 'sentence', 'section_heading', 'heading_text', 'pullquote_credit', 'paragraph_end', - 'footnote', - 'text_plate', - 'video', 'subtitle', - 'image', - 'gallery', 'carousel', 'grid', 'vitrine', - 'gallery_advance', - 'curtain', 'intro', 'schedule', -].map(name => ({ name, label: ANNOTATION_SELECT_LABELS[name] || capitalize(name.replace('_', ' ')) })) + { + name: "text", + options: [ + 'sentence', + 'section_heading', + 'heading_text', + 'pullquote_credit', + 'paragraph_end', + 'footnote', + 'text_plate', + ].map(mapNameToAnnotationFunction) + }, + { + name: "image", + options: [ + 'curtain', + 'image', + ].map(mapNameToAnnotationFunction) + }, + { + name: "video", + options: [ + 'video', + 'subtitle', + 'video_set_volume', + ].map(mapNameToAnnotationFunction) + }, + { + name: "gallery", + options: [ + 'carousel', + 'gallery_advance', + 'grid', + 'vitrine', + 'gallery', + ].map(mapNameToAnnotationFunction) + }, + { + name: "intro", + options: [ + 'intro', + 'subtitle', + ].map(mapNameToAnnotationFunction) + }, +] export const TEXT_ANNOTATION_TYPES = new Set([ 'section_heading', 'heading_text', 'sentence', 'paragraph_end', 'pullquote_credit', @@ -98,7 +139,7 @@ export const FULLSCREEN_UTILITY_ANNOTATION_TYPES = new Set([ ]) export const CUE_UTILITY_ANNOTATION_TYPES = new Set([ - 'gallery_advance', + 'gallery_advance', 'video_set_volume', ]) // elements which, if fullscreen, will not disappear if the episode is paused |
