From d2cb17038b8537a609be06be2ed7013dbe27117e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 8 Mar 2021 22:11:55 +0100 Subject: beginning the BIG refactor. moving editor stuff into per-episode hierarchy --- .../annotationForms/annotationForm.gallery.js | 132 ---------------- .../annotationForms/annotationForm.image.js | 120 -------------- .../annotationForms/annotationForm.text.js | 153 ------------------ .../annotationForms/annotationForm.utility.js | 172 --------------------- .../annotationForms/annotationForm.video.js | 160 ------------------- .../annotations/annotationForms/index.js | 46 ------ 6 files changed, 783 deletions(-) delete mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js delete mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js delete mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.text.js delete mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js delete mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js delete mode 100644 animism-align/frontend/app/views/align/components/annotations/annotationForms/index.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 deleted file mode 100644 index 0a8b3fb..0000000 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.gallery.js +++ /dev/null @@ -1,132 +0,0 @@ -import React, { Component } from 'react' - -import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' -import { TextInput, Select, Checkbox, LabelDescription } from 'app/common' -import { AnnotationFormFullscreen } from './annotationForm.utility' -import { makeMediaItems, makeGalleryItems } from 'app/utils/annotation.utils' - -export const AnnotationFormGallery = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { - if (!media.lookup) return
- const image_list_items = makeMediaItems(media, ['gallery']) - return ( -
- - - - - {gallery_items && ( - - - {gallery_items && ( - - - {(annotation.settings.fullscreen) && ( -
- - -
- )} - - - - - - - - {(annotation.settings.fullscreen && !annotation.settings.inline) && ( - - )} -
- ) -} diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.text.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.text.js deleted file mode 100644 index 8bc7675..0000000 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.text.js +++ /dev/null @@ -1,153 +0,0 @@ -import React, { Component } from 'react' - -import { - CURTAIN_COLOR_SELECT_OPTIONS, - CURTAIN_STYLE_SELECT_OPTIONS, - BLACK_WHITE_SELECT_OPTIONS, - IMAGE_BACKGROUND_SIZE_OPTIONS, -} from 'app/constants' -import { Select, Checkbox, TextInput, LabelDescription } from 'app/common' -import { AnnotationFormFullscreen } from './annotationForm.utility' -import { makeMediaItems } from 'app/utils/annotation.utils' - -export const AnnotationFormSectionHeading = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { - const image_list_items = makeMediaItems(media, ['image', 'video', 'gallery']) - return ( -
- - - - - {'Player will fade from this color when section begins'} - - {!annotation.settings.no_audio && -
- - - - -
- ) -} - -export const AnnotationFormFootnote = ({ annotation, handleSettingsSelect, handleSettingsChange }) => { - return ( -
- -
- ) -} 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 deleted file mode 100644 index 7e823cc..0000000 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.utility.js +++ /dev/null @@ -1,172 +0,0 @@ -import React, { Component } from 'react' - -import { timestamp } from 'app/utils' -import { TextInput, LabelDescription, Select, Checkbox } from 'app/common' -import { CURTAIN_COLOR_SELECT_OPTIONS, CURTAIN_STYLE_SELECT_OPTIONS } from 'app/constants' -import { annotationFadeTimings } from 'app/utils/annotation.utils' -import { makeMediaItems } from 'app/utils/annotation.utils' - -export const AnnotationFormIntro = ({ annotation, media, handleSettingsChange, handleSettingsSelect }) => { - if (!media.lookup) return
- const image_list_items = makeMediaItems(media, 'file') - return ( -
- - - - - - {'Timestamp where voiceover starts, after any intro sound effect.'} - - - -
- ) -} - -export const AnnotationFormCurtain = ({ annotation, handleSettingsChange, handleSettingsSelect }) => { - return ( -
- - - - - - - -
- ) -} - -export const AnnotationFormFullscreen = ({ annotation, handleSettingsChange, handleSettingsSelect }) => { - const { - fadeInDuration, fadeOutDuration, duration, - start_ts, end_ts, fade_in_end_ts, fade_out_start_ts, - } = annotationFadeTimings(annotation) - return ( -
- - - {duration} - {' seconds, ends at '} - {timestamp(end_ts)} - - - - - {fadeInDuration} - {' seconds, ends at '} - {timestamp(fade_in_end_ts)} - - - - - {fadeOutDuration} - {' seconds, starts at '} - {timestamp(fade_out_start_ts)} - -
- ) -} 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 deleted file mode 100644 index dd5f640..0000000 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js +++ /dev/null @@ -1,160 +0,0 @@ -import React, { Component } from 'react' - -import { CURTAIN_COLOR_SELECT_OPTIONS, IMAGE_BACKGROUND_SIZE_OPTIONS } from 'app/constants' -import { Select, Checkbox, TextInput, LabelDescription } from 'app/common' -import { AnnotationFormFullscreen } from './annotationForm.utility' -import { makeMediaItems } from 'app/utils/annotation.utils' - -export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { - if (!media.lookup) return
- const video_list_items = makeMediaItems(media, ['video']) - return ( -
- - - - - {'Auto-advances the video to this point when starting'} - - - {(annotation.settings.fullscreen && !annotation.settings.inline) && ( - - )} -
- ) -} - -export const AnnotationFormVideoSetVolume = ({ annotation, handleSettingsChange }) => { - return ( -
- - -
- ) -} \ No newline at end of file diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/index.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/index.js deleted file mode 100644 index 8a1be48..0000000 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/index.js +++ /dev/null @@ -1,46 +0,0 @@ -import { - AnnotationFormSectionHeading, - AnnotationFormTextPlate, - AnnotationFormFootnote, - AnnotationFormSubtitle, -} from './annotationForm.text' - -import { - AnnotationFormVideo, - AnnotationFormVideoSetVolume, -} from './annotationForm.video' - -import { - AnnotationFormImage, -} from './annotationForm.image' - -import { - AnnotationFormGallery, - AnnotationFormGalleryAdvance, -} from './annotationForm.gallery' - -import { - AnnotationFormCurtain, - AnnotationFormIntro, -} from './annotationForm.utility' - -export const annotationFormLookup = { - section_heading: AnnotationFormSectionHeading, - text_plate: AnnotationFormTextPlate, - footnote: AnnotationFormFootnote, - subtitle: AnnotationFormSubtitle, - - image: AnnotationFormImage, - video: AnnotationFormVideo, - video_set_volume: AnnotationFormVideoSetVolume, - - gallery: AnnotationFormGallery, - carousel: AnnotationFormGallery, - grid: AnnotationFormGallery, - vitrine: AnnotationFormGallery, - - gallery_advance: AnnotationFormGalleryAdvance, - - intro: AnnotationFormIntro, - curtain: AnnotationFormCurtain, -} -- cgit v1.2.3-70-g09d2