refactor(Settings): rename blurUnwatchedImage to hideSpoilers

This commit is contained in:
Botzy 2025-03-14 18:20:16 +02:00
parent baf3a92693
commit 7adfa8ff39
3 changed files with 7 additions and 7 deletions

View file

@ -31,7 +31,7 @@ const Settings = () => {
const toast = useToast(); const toast = useToast();
const { const {
interfaceLanguageSelect, interfaceLanguageSelect,
blurUnwatchedImageToggle, hideSpoilersToggle,
subtitlesLanguageSelect, subtitlesLanguageSelect,
subtitlesSizeSelect, subtitlesSizeSelect,
subtitlesTextColorInput, subtitlesTextColorInput,
@ -510,7 +510,7 @@ const Settings = () => {
<Toggle <Toggle
className={classnames(styles['option-input-container'], styles['toggle-container'])} className={classnames(styles['option-input-container'], styles['toggle-container'])}
tabIndex={-1} tabIndex={-1}
{...blurUnwatchedImageToggle} {...hideSpoilersToggle}
/> />
</div> </div>
{ {

View file

@ -32,8 +32,8 @@ const useProfileSettingsInputs = (profile) => {
} }
}), [profile.settings]); }), [profile.settings]);
const blurUnwatchedImageToggle = React.useMemo(() => ({ const hideSpoilersToggle = React.useMemo(() => ({
checked: profile.settings.blurUnwatchedImage, checked: profile.settings.hideSpoilers,
onClick: () => { onClick: () => {
core.transport.dispatch({ core.transport.dispatch({
action: 'Ctx', action: 'Ctx',
@ -41,7 +41,7 @@ const useProfileSettingsInputs = (profile) => {
action: 'UpdateSettings', action: 'UpdateSettings',
args: { args: {
...profile.settings, ...profile.settings,
blurUnwatchedImage: !profile.settings.blurUnwatchedImage hideSpoilers: !profile.settings.hideSpoilers
} }
} }
}); });
@ -341,7 +341,7 @@ const useProfileSettingsInputs = (profile) => {
}), [profile.settings]); }), [profile.settings]);
return { return {
interfaceLanguageSelect, interfaceLanguageSelect,
blurUnwatchedImageToggle, hideSpoilersToggle,
subtitlesLanguageSelect, subtitlesLanguageSelect,
subtitlesSizeSelect, subtitlesSizeSelect,
subtitlesTextColorInput, subtitlesTextColorInput,

View file

@ -21,7 +21,7 @@ type Settings = {
hardwareDecoding: boolean, hardwareDecoding: boolean,
escExitFullscreen: boolean, escExitFullscreen: boolean,
interfaceLanguage: string, interfaceLanguage: string,
blurUnwatchedImage: boolean, hideSpoilers: boolean,
nextVideoNotificationDuration: number, nextVideoNotificationDuration: number,
playInBackground: boolean, playInBackground: boolean,
playerType: string | null, playerType: string | null,