From 892c6310ed87446efa261fe86a4f5d5cecb211b0 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Mon, 30 Sep 2019 15:41:12 +0300 Subject: [PATCH] SectionsList PropTypes --- src/routes/Settings/SectionsList/SectionsList.js | 15 +++++++++++++++ src/routes/Settings/constants.js | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/routes/Settings/SectionsList/SectionsList.js b/src/routes/Settings/SectionsList/SectionsList.js index 5732f34f7..bfc6e411c 100644 --- a/src/routes/Settings/SectionsList/SectionsList.js +++ b/src/routes/Settings/SectionsList/SectionsList.js @@ -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, diff --git a/src/routes/Settings/constants.js b/src/routes/Settings/constants.js index 2c1a25ea7..563bbd8c2 100644 --- a/src/routes/Settings/constants.js +++ b/src/routes/Settings/constants.js @@ -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' },