From 09a85bc3a036e3e8ca3f931e30959a2d26fd3911 Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Tue, 11 Feb 2020 16:04:19 +0200 Subject: [PATCH] subtitles colors changed in core --- .../Settings/useProfileSettingsInputs.js | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/routes/Settings/useProfileSettingsInputs.js b/src/routes/Settings/useProfileSettingsInputs.js index f007eb0c9..77a94d61b 100644 --- a/src/routes/Settings/useProfileSettingsInputs.js +++ b/src/routes/Settings/useProfileSettingsInputs.js @@ -83,21 +83,48 @@ const useProfileSettingsInputs = () => { const subtitlesTextColorInput = React.useMemo(() => ({ value: profile.settings.subtitles_text_color, onChange: (event) => { - console.log(event); + core.dispatch({ + action: 'Ctx', + args: { + action: 'UpdateSettings', + args: { + ...profile.settings, + subtitles_text_color: event.value + } + } + }); } - }), [profile.settings.subtitles_text_color]); + }), [profile.settings]); const subtitlesBackgroundColorInput = React.useMemo(() => ({ value: profile.settings.subtitles_background_color, onChange: (event) => { - console.log(event); + core.dispatch({ + action: 'Ctx', + args: { + action: 'UpdateSettings', + args: { + ...profile.settings, + subtitles_background_color: event.value + } + } + }); } - }), [profile.settings.subtitles_background_color]); + }), [profile.settings]); const subtitlesOutlineColorInput = React.useMemo(() => ({ value: profile.settings.subtitles_outline_color, onChange: (event) => { - console.log(event); + core.dispatch({ + action: 'Ctx', + args: { + action: 'UpdateSettings', + args: { + ...profile.settings, + subtitles_outline_color: event.value + } + } + }); } - }), [profile.settings.subtitles_outline_color]); + }), [profile.settings]); const bingeWatchingCheckbox = React.useMemo(() => ({ checked: profile.settings.binge_watching, onClick: (event) => {