From f38815753af0b72c0407a2efe448a6c8a027ddca Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 7 Aug 2020 18:16:54 +0200 Subject: add intro gif --- .../components/annotations/annotation.form.js | 2 +- .../annotationForms/annotationForm.utility.js | 48 ++++++++++++++++++++++ .../annotations/annotationForms/index.js | 2 + .../annotationTypes/annotationTypes.utility.js | 34 +++++++++++++++ .../annotations/annotationTypes/index.js | 2 + 5 files changed, 87 insertions(+), 1 deletion(-) (limited to 'animism-align/frontend/app/views/align/components/annotations') diff --git a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js index 5842aab..80a960f 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js @@ -16,7 +16,7 @@ const ANNOTATION_TYPES = [ 'sentence', 'section_heading', 'heading_text', 'paragraph_end', 'video', 'image', 'image_carousel', - 'curtain', + 'curtain', 'intro', ].map(name => ({ name, label: capitalize(name.replace('_', ' ')) })) class AnnotationForm extends Component { diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js index 6c835c5..750c3a7 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js @@ -5,6 +5,54 @@ import { TextInput, LabelDescription, Select, Checkbox } from 'app/common' import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' import { annotationFadeTimings } from 'app/utils/annotation.utils' +export const AnnotationFormIntro = ({ annotation, media, handleSettingsChange, handleSettingsSelect }) => { + if (!media.lookup) return
+ const { lookup, order } = media + const image_list_items = order.filter(id => lookup[id].type === 'file').map(id => { + const image = lookup[id] + return { + name: image.id, + label: image.title + } + }) + return ( +
+