mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
surround sound checkbox added to settings
This commit is contained in:
parent
a8588d2c78
commit
b9efa02727
3 changed files with 28 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ const Settings = () => {
|
|||
subtitlesBackgroundColorInput,
|
||||
subtitlesOutlineColorInput,
|
||||
audioLanguageSelect,
|
||||
surroundSoundCheckbox,
|
||||
seekTimeDurationSelect,
|
||||
seekShortTimeDurationSelect,
|
||||
escExitFullscreenCheckbox,
|
||||
|
|
@ -405,6 +406,16 @@ const Settings = () => {
|
|||
{...audioLanguageSelect}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles['option-container']}>
|
||||
<div className={styles['option-name-container']}>
|
||||
<div className={styles['label']}>{ t('SETTINGS_SURROUND_SOUND') }</div>
|
||||
</div>
|
||||
<Checkbox
|
||||
className={classnames(styles['option-input-container'], styles['checkbox-container'])}
|
||||
tabIndex={-1}
|
||||
{...surroundSoundCheckbox}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles['section-container']}>
|
||||
<div className={styles['section-category-container']}>
|
||||
|
|
|
|||
|
|
@ -135,6 +135,21 @@ const useProfileSettingsInputs = (profile) => {
|
|||
});
|
||||
}
|
||||
}), [profile.settings]);
|
||||
const surroundSoundCheckbox = React.useMemo(() => ({
|
||||
checked: profile.settings.surroundSound,
|
||||
onClick: () => {
|
||||
core.transport.dispatch({
|
||||
action: 'Ctx',
|
||||
args: {
|
||||
action: 'UpdateSettings',
|
||||
args: {
|
||||
...profile.settings,
|
||||
surroundSound: !profile.settings.surroundSound
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}), [profile.settings]);
|
||||
const escExitFullscreenCheckbox = React.useMemo(() => ({
|
||||
checked: profile.settings.escExitFullscreen,
|
||||
onClick: () => {
|
||||
|
|
@ -307,6 +322,7 @@ const useProfileSettingsInputs = (profile) => {
|
|||
subtitlesBackgroundColorInput,
|
||||
subtitlesOutlineColorInput,
|
||||
audioLanguageSelect,
|
||||
surroundSoundCheckbox,
|
||||
escExitFullscreenCheckbox,
|
||||
seekTimeDurationSelect,
|
||||
seekShortTimeDurationSelect,
|
||||
|
|
|
|||
1
src/types/models/Ctx.d.ts
vendored
1
src/types/models/Ctx.d.ts
vendored
|
|
@ -37,6 +37,7 @@ type Settings = {
|
|||
subtitlesOutlineColor: string,
|
||||
subtitlesSize: number,
|
||||
subtitlesTextColor: string,
|
||||
surroundSound: boolean,
|
||||
};
|
||||
|
||||
type Profile = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue