1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
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 (
<div className='options'>
<Checkbox
label="Hidden"
name="hidden"
checked={annotation.settings.hidden}
onChange={handleSettingsSelect}
/>
<Select
title='Background Color'
name='color'
selected={annotation.settings.color}
options={BLACK_WHITE_SELECT_OPTIONS}
defaultOption='Pick a color'
onChange={handleSettingsSelect}
/>
<Select
title='Cover image'
name='media_id'
className="media_id"
selected={annotation.settings.media_id}
options={image_list_items}
defaultOption='Choose an image'
onChange={handleSettingsSelect}
/>
<Select
title='Cover style'
name='cover_style'
className="cover_style"
selected={annotation.settings.cover_style}
options={IMAGE_BACKGROUND_SIZE_OPTIONS}
defaultOption='Cover image caption style'
onChange={handleSettingsSelect}
/>
<LabelDescription>
{'Background color for section'}
</LabelDescription>
<Select
title='Transition Color'
name='transition_color'
selected={annotation.settings.transition_color}
options={CURTAIN_COLOR_SELECT_OPTIONS}
defaultOption='Pick a color'
onChange={handleSettingsSelect}
/>
<LabelDescription>
{'Player will fade from this color when section begins'}
</LabelDescription>
{!annotation.settings.no_audio &&
<div>
<Select
title='Section Nav Color'
name='section_nav_color'
selected={annotation.settings.section_nav_color}
options={BLACK_WHITE_SELECT_OPTIONS}
defaultOption='Pick a color'
onChange={handleSettingsSelect}
/>
<LabelDescription>
{'Section nav thumbnail icon color'}
</LabelDescription>
</div>
}
<Checkbox
label="Section does not have audio"
name="no_audio"
checked={annotation.settings.no_audio}
onChange={handleSettingsSelect}
/>
<LabelDescription>
{'Check if this is a text-only section'}
</LabelDescription>
</div>
)
}
export const AnnotationFormTextPlate = ({ annotation, handleSettingsSelect, handleSettingsChange }) => {
return (
<div className='options'>
<Select
title='Color'
name='color'
selected={annotation.settings.color}
options={CURTAIN_COLOR_SELECT_OPTIONS}
defaultOption='Pick a color'
onChange={handleSettingsSelect}
/>
<Select
title='Curtain style'
name='transition_color'
selected={annotation.settings.transition_color}
options={CURTAIN_STYLE_SELECT_OPTIONS}
defaultOption='Pick a style'
onChange={handleSettingsSelect}
/>
<AnnotationFormFullscreen
annotation={annotation}
handleSettingsChange={handleSettingsChange}
handleSettingsSelect={handleSettingsSelect}
/>
</div>
)
}
export const AnnotationFormSubtitle = ({ annotation, handleSettingsSelect, handleSettingsChange }) => {
return (
<div className='options'>
<Select
title='Color'
name='color'
selected={annotation.settings.color}
options={CURTAIN_COLOR_SELECT_OPTIONS}
defaultOption='Pick a color'
onChange={handleSettingsSelect}
/>
<AnnotationFormFullscreen
annotation={annotation}
handleSettingsChange={handleSettingsChange}
handleSettingsSelect={handleSettingsSelect}
/>
</div>
)
}
export const AnnotationFormFootnote = ({ annotation, handleSettingsSelect, handleSettingsChange }) => {
return (
<div className='options'>
<TextInput
title="Actual Timestamp"
name="actual_ts"
placeholder="0:00"
data={annotation.settings}
onChange={handleSettingsChange}
autoComplete="off"
/>
</div>
)
}
|