summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/align/components/annotations/annotationForms
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-27 22:34:33 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-27 22:34:33 +0200
commit0919fde0919aa8ce2724ecb9797eee94774fe126 (patch)
treee5a5af23bbb2b7f11a2e893763e2495736287584 /animism-align/frontend/app/views/align/components/annotations/annotationForms
parentefa31f76bd00fed5684ada9f948692e7051ecc4e (diff)
formz
Diffstat (limited to 'animism-align/frontend/app/views/align/components/annotations/annotationForms')
-rw-r--r--animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js2
-rw-r--r--animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js23
2 files changed, 22 insertions, 3 deletions
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 2509970..0a6cc17 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,6 +1,6 @@
import React, { Component } from 'react'
-import { Select } from 'app/common'
+import { Select, Checkbox } from 'app/common'
import { AnnotationFormFullscreen } from './annotationForm.utility'
export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => {
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js
index 655efdc..5b4e199 100644
--- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js
+++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js
@@ -1,8 +1,9 @@
import React, { Component } from 'react'
-import { Select } from 'app/common'
+import { Select, Checkbox } from 'app/common'
+import { AnnotationFormFullscreen } from './annotationForm.utility'
-export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect }) => {
+export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => {
if (!media.lookup) return <div />
const { lookup, order } = media
const video_list_items = order.filter(id => lookup[id].type === 'video').map(id => {
@@ -22,6 +23,24 @@ export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect })
defaultOption='Choose a video'
onChange={handleSettingsSelect}
/>
+ <Checkbox
+ label="Fullscreen"
+ name="fullscreen"
+ checked={annotation.settings.fullscreen}
+ onChange={handleSettingsSelect}
+ />
+ <Checkbox
+ label="Inline"
+ name="inline"
+ checked={annotation.settings.inline}
+ onChange={handleSettingsSelect}
+ />
+ {(annotation.settings.fullscreen && !annotation.settings.inline) && (
+ <AnnotationFormFullscreen
+ annotation={annotation}
+ handleSettingsChange={handleSettingsChange}
+ />
+ )}
</div>
)
}