mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
refactor(Settings): rename blurUnwatchedImage to hideSpoilers
This commit is contained in:
parent
baf3a92693
commit
7adfa8ff39
3 changed files with 7 additions and 7 deletions
|
|
@ -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>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
2
src/types/models/Ctx.d.ts
vendored
2
src/types/models/Ctx.d.ts
vendored
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue