diff --git a/src/routes/Settings/Settings.js b/src/routes/Settings/Settings.js index f238c1d02..141b6e576 100644 --- a/src/routes/Settings/Settings.js +++ b/src/routes/Settings/Settings.js @@ -31,6 +31,7 @@ const Settings = () => { const toast = useToast(); const { interfaceLanguageSelect, + blurUnwatchedImageToggle, subtitlesLanguageSelect, subtitlesSizeSelect, subtitlesTextColorInput, @@ -502,6 +503,16 @@ const Settings = () => { {...playInExternalPlayerSelect} /> +
+
+
{ t('SETTINGS_BLUR_UNWATCHED_IMAGE') }
+
+ +
{ shell.active &&
diff --git a/src/routes/Settings/useProfileSettingsInputs.js b/src/routes/Settings/useProfileSettingsInputs.js index c193c6eaf..41d294a45 100644 --- a/src/routes/Settings/useProfileSettingsInputs.js +++ b/src/routes/Settings/useProfileSettingsInputs.js @@ -32,6 +32,22 @@ const useProfileSettingsInputs = (profile) => { } }), [profile.settings]); + const blurUnwatchedImageToggle = React.useMemo(() => ({ + checked: profile.settings.blurUnwatchedImage, + onClick: () => { + core.transport.dispatch({ + action: 'Ctx', + args: { + action: 'UpdateSettings', + args: { + ...profile.settings, + blurUnwatchedImage: !profile.settings.blurUnwatchedImage + } + } + }); + } + }), [profile.settings]); + const quitOnCloseToggle = React.useMemo(() => ({ checked: profile.settings.quitOnClose, onClick: () => { @@ -325,6 +341,7 @@ const useProfileSettingsInputs = (profile) => { }), [profile.settings]); return { interfaceLanguageSelect, + blurUnwatchedImageToggle, subtitlesLanguageSelect, subtitlesSizeSelect, subtitlesTextColorInput, diff --git a/src/types/models/Ctx.d.ts b/src/types/models/Ctx.d.ts index a86fd60fa..61b33dfdd 100644 --- a/src/types/models/Ctx.d.ts +++ b/src/types/models/Ctx.d.ts @@ -21,6 +21,7 @@ type Settings = { hardwareDecoding: boolean, escExitFullscreen: boolean, interfaceLanguage: string, + blurUnwatchedImage: boolean, nextVideoNotificationDuration: number, playInBackground: boolean, playerType: string | null,