diff options
5 files changed, 27 insertions, 5 deletions
diff --git a/animism-align/frontend/app/common/form.component.js b/animism-align/frontend/app/common/form.component.js index 4eee10b..bbdf26d 100644 --- a/animism-align/frontend/app/common/form.component.js +++ b/animism-align/frontend/app/common/form.component.js @@ -78,7 +78,7 @@ export const Checkbox = props => ( type="checkbox" name={props.name} value={1} - checked={props.checked} + checked={!!props.checked} onChange={(e) => props.onChange(props.name, e.target.checked)} /> <span>{props.label}</span> diff --git a/animism-align/frontend/app/views/align/components/annotations/annotation.form.css b/animism-align/frontend/app/views/align/components/annotations/annotation.form.css index fdb4abe..26eeb26 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotation.form.css +++ b/animism-align/frontend/app/views/align/components/annotations/annotation.form.css @@ -53,3 +53,6 @@ margin: 0 0.5rem 0 0; width: 1.4rem; } +.annotationForm .checkbox { + margin-bottom: 0.5rem; +}
\ No newline at end of file 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> ) } diff --git a/animism-align/frontend/app/views/viewer/viewer.fonts.css b/animism-align/frontend/app/views/viewer/viewer.fonts.css index 09631ee..e13f195 100644 --- a/animism-align/frontend/app/views/viewer/viewer.fonts.css +++ b/animism-align/frontend/app/views/viewer/viewer.fonts.css @@ -1,6 +1,6 @@ @font-face{ font-family: "Freight Text"; - src: url("//freigtexprobook-webfont.woff2") format("woff2"), + src: url("/static/fonts/eflux/freigtexprobook-webfont.woff2") format("woff2"), url("/static/fonts/eflux/freigtexprobook-webfont.woff") format("woff"); font-weight: 400; font-style: normal; |
