mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +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,
|
subtitlesBackgroundColorInput,
|
||||||
subtitlesOutlineColorInput,
|
subtitlesOutlineColorInput,
|
||||||
audioLanguageSelect,
|
audioLanguageSelect,
|
||||||
|
surroundSoundCheckbox,
|
||||||
seekTimeDurationSelect,
|
seekTimeDurationSelect,
|
||||||
seekShortTimeDurationSelect,
|
seekShortTimeDurationSelect,
|
||||||
escExitFullscreenCheckbox,
|
escExitFullscreenCheckbox,
|
||||||
|
|
@ -405,6 +406,16 @@ const Settings = () => {
|
||||||
{...audioLanguageSelect}
|
{...audioLanguageSelect}
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
||||||
<div className={styles['section-container']}>
|
<div className={styles['section-container']}>
|
||||||
<div className={styles['section-category-container']}>
|
<div className={styles['section-category-container']}>
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,21 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [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(() => ({
|
const escExitFullscreenCheckbox = React.useMemo(() => ({
|
||||||
checked: profile.settings.escExitFullscreen,
|
checked: profile.settings.escExitFullscreen,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
|
|
@ -307,6 +322,7 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
subtitlesBackgroundColorInput,
|
subtitlesBackgroundColorInput,
|
||||||
subtitlesOutlineColorInput,
|
subtitlesOutlineColorInput,
|
||||||
audioLanguageSelect,
|
audioLanguageSelect,
|
||||||
|
surroundSoundCheckbox,
|
||||||
escExitFullscreenCheckbox,
|
escExitFullscreenCheckbox,
|
||||||
seekTimeDurationSelect,
|
seekTimeDurationSelect,
|
||||||
seekShortTimeDurationSelect,
|
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,
|
subtitlesOutlineColor: string,
|
||||||
subtitlesSize: number,
|
subtitlesSize: number,
|
||||||
subtitlesTextColor: string,
|
subtitlesTextColor: string,
|
||||||
|
surroundSound: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
type Profile = {
|
type Profile = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue