From 6a4d95f988e7782080de3056fe60522404ea4a12 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 11 Aug 2020 19:38:53 +0200 Subject: adding vitrine --- .../annotationForms/annotationForm.gallery.js | 69 ++++++++++++++++++++++ .../annotationForms/annotationForm.image.js | 13 ++++ .../annotationForms/annotationForm.utility.js | 27 ++++++--- .../annotationForms/annotationForm.video.js | 10 ++++ .../annotations/annotationForms/index.js | 7 +++ 5 files changed, 117 insertions(+), 9 deletions(-) create mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js (limited to 'animism-align/frontend/app/views/align/components/annotations/annotationForms') diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js new file mode 100644 index 0000000..e85c6f3 --- /dev/null +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js @@ -0,0 +1,69 @@ +import React, { Component } from 'react' + +import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' +import { TextInput, Select, Checkbox } from 'app/common' +import { AnnotationFormFullscreen } from './annotationForm.utility' + +export const AnnotationFormGallery = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { + if (!media.lookup) return
+ const { lookup, order } = media + const image_list_items = order.filter(id => lookup[id].type === 'gallery').map(id => { + const image = lookup[id] + return { + name: image.id, + label: image.author + ' - ' + image.title + } + }) + return ( +
+ + + {(annotation.settings.fullscreen && !annotation.settings.inline) && ( + + )} +
+ ) +} diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js index 9ca5295..285dbcc 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' +import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' import { Select, Checkbox } from 'app/common' import { AnnotationFormFullscreen } from './annotationForm.utility' @@ -23,18 +24,30 @@ export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, h defaultOption='Choose an image' onChange={handleSettingsSelect} /> + + + + + + - +