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

View file

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

View file

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