SectionsList PropTypes

This commit is contained in:
Vladimir Borisov 2019-09-30 15:41:12 +03:00
parent 1ff6c298fe
commit 892c6310ed
No known key found for this signature in database
GPG key ID: F9A584BE4FCB6603
2 changed files with 17 additions and 2 deletions

View file

@ -170,6 +170,21 @@ SectionsList.propTypes = {
className: PropTypes.string,
sections: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.string.isRequired,
ref: PropTypes.shape({
current: PropTypes.object,
}).isRequired,
inputs: PropTypes.arrayOf(PropTypes.shape({
type: PropTypes.string.isRequired,
id: PropTypes.string,
header: PropTypes.string,
label: PropTypes.string,
icon: PropTypes.string,
href: PropTypes.string,
options: PropTypes.arrayOf(PropTypes.shape({
label: PropTypes.string.isRequired,
value: PropTypes.string.isRequired,
})),
})),
})),
preferences: PropTypes.object,
onPreferenceChanged: PropTypes.func.isRequired,

View file

@ -8,8 +8,8 @@ const settingsSections = {
{ 'header': 'Default Subtitles Language', 'label': 'Default Subtitles Language', 'type': 'select', 'options': [{ 'label': 'Български език', 'value': 'bul' }, { 'label': 'English', 'value': 'eng' }, { 'label': 'Deutsch', 'value': 'ger' }, { 'label': 'Español', 'value': 'esp' }, { 'label': 'Italiano', 'value': 'ita' }], 'id': 'default_subtitles_language' },
{ 'header': 'Default Subtitles Size', 'label': 'Default Subtitles Size', 'type': 'select', 'options': [{ 'label': '72%', 'value': '72%' }, { 'label': '80%', 'value': '80%' }, { 'label': '100%', 'value': '100%' }, { 'label': '120%', 'value': '120%' }, { 'label': '140%', 'value': '140%' }, { 'label': '160%', 'value': '160%' }, { 'label': '180%', 'value': '180%' }], 'id': 'default_subtitles_size' },
{ 'header': 'Subtitles Background', 'label': 'Subtitles background', 'type': 'select', 'options': [{ 'label': 'None', 'value': '' }, { 'label': 'Solid', 'value': 'solid' }, { 'label': 'Transparent', 'value': 'transparent' }], 'id': 'subtitles_background' },
{ 'header': 'Subtitles color', 'label': 'Subtitles color', 'type': 'color', 'color': '#FFFFFF', 'id': 'subtitles_color' },
{ 'header': 'Subtitles outline color', 'label': 'Subtitles outline color', 'type': 'color', 'color': '#000000', 'id': 'subtitles_outline_color' },
{ 'header': 'Subtitles color', 'label': 'Subtitles color', 'type': 'color', 'id': 'subtitles_color' },
{ 'header': 'Subtitles outline color', 'label': 'Subtitles outline color', 'type': 'color', 'id': 'subtitles_outline_color' },
{ 'label': 'Auto-play next episode', 'type': 'checkbox', 'id': 'auto-play_next_episode' },
{ 'label': 'Pause playback when minimized', 'type': 'checkbox', 'id': 'pause_playback_when_minimized' },
{ 'label': 'Hardware-accelerated decoding', 'type': 'checkbox', 'id': 'hardware-accelerated_decoding' },