mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 11:42:05 +00:00
Merge pull request #829 from Stremio/fix/subtitles-action-menu-scroll
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
Player: Subtitles Settings scrollable on mobile
This commit is contained in:
commit
d05488feb6
2 changed files with 56 additions and 50 deletions
|
|
@ -213,60 +213,62 @@ const SubtitlesMenu = React.memo((props) => {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles['subtitles-settings-container']}>
|
<div className={styles['subtitles-settings-container']}>
|
||||||
<div className={styles['settings-header']}>Subtitles Settings</div>
|
<div className={styles['settings-header']}>{t('PLAYER_SUBTITLES_SETTINGS')}</div>
|
||||||
<DiscreteSelectInput
|
<div className={styles['settings-list']}>
|
||||||
className={styles['discrete-input']}
|
<DiscreteSelectInput
|
||||||
label={t('DELAY')}
|
className={styles['discrete-input']}
|
||||||
value={typeof props.selectedExtraSubtitlesTrackId === 'string' && props.extraSubtitlesDelay !== null && !isNaN(props.extraSubtitlesDelay) ? `${(props.extraSubtitlesDelay / 1000).toFixed(2)}s` : '--'}
|
label={t('DELAY')}
|
||||||
disabled={typeof props.selectedExtraSubtitlesTrackId !== 'string' || props.extraSubtitlesDelay === null || isNaN(props.extraSubtitlesDelay)}
|
value={typeof props.selectedExtraSubtitlesTrackId === 'string' && props.extraSubtitlesDelay !== null && !isNaN(props.extraSubtitlesDelay) ? `${(props.extraSubtitlesDelay / 1000).toFixed(2)}s` : '--'}
|
||||||
onChange={onSubtitlesDelayChanged}
|
disabled={typeof props.selectedExtraSubtitlesTrackId !== 'string' || props.extraSubtitlesDelay === null || isNaN(props.extraSubtitlesDelay)}
|
||||||
/>
|
onChange={onSubtitlesDelayChanged}
|
||||||
<DiscreteSelectInput
|
/>
|
||||||
className={styles['discrete-input']}
|
<DiscreteSelectInput
|
||||||
label={t('SIZE')}
|
className={styles['discrete-input']}
|
||||||
value={
|
label={t('SIZE')}
|
||||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
value={
|
||||||
props.subtitlesSize !== null && !isNaN(props.subtitlesSize) ? `${props.subtitlesSize}%` : '--'
|
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||||
:
|
props.subtitlesSize !== null && !isNaN(props.subtitlesSize) ? `${props.subtitlesSize}%` : '--'
|
||||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
|
||||||
props.extraSubtitlesSize !== null && !isNaN(props.extraSubtitlesSize) ? `${props.extraSubtitlesSize}%` : '--'
|
|
||||||
:
|
:
|
||||||
'--'
|
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||||
}
|
props.extraSubtitlesSize !== null && !isNaN(props.extraSubtitlesSize) ? `${props.extraSubtitlesSize}%` : '--'
|
||||||
disabled={
|
:
|
||||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
'--'
|
||||||
props.subtitlesSize === null || isNaN(props.subtitlesSize)
|
}
|
||||||
:
|
disabled={
|
||||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||||
props.extraSubtitlesSize === null || isNaN(props.extraSubtitlesSize)
|
props.subtitlesSize === null || isNaN(props.subtitlesSize)
|
||||||
:
|
:
|
||||||
true
|
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||||
}
|
props.extraSubtitlesSize === null || isNaN(props.extraSubtitlesSize)
|
||||||
onChange={onSubtitlesSizeChanged}
|
:
|
||||||
/>
|
true
|
||||||
<DiscreteSelectInput
|
}
|
||||||
className={styles['discrete-input']}
|
onChange={onSubtitlesSizeChanged}
|
||||||
label={t('PLAYER_SUBTITLES_VERTICAL_POSIITON')}
|
/>
|
||||||
value={
|
<DiscreteSelectInput
|
||||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
className={styles['discrete-input']}
|
||||||
props.subtitlesOffset !== null && !isNaN(props.subtitlesOffset) ? `${props.subtitlesOffset}%` : '--'
|
label={t('PLAYER_SUBTITLES_VERTICAL_POSIITON')}
|
||||||
:
|
value={
|
||||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||||
props.extraSubtitlesOffset !== null && !isNaN(props.extraSubtitlesOffset) ? `${props.extraSubtitlesOffset}%` : '--'
|
props.subtitlesOffset !== null && !isNaN(props.subtitlesOffset) ? `${props.subtitlesOffset}%` : '--'
|
||||||
:
|
:
|
||||||
'--'
|
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||||
}
|
props.extraSubtitlesOffset !== null && !isNaN(props.extraSubtitlesOffset) ? `${props.extraSubtitlesOffset}%` : '--'
|
||||||
disabled={
|
:
|
||||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
'--'
|
||||||
props.subtitlesOffset === null || isNaN(props.subtitlesOffset)
|
}
|
||||||
:
|
disabled={
|
||||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||||
props.extraSubtitlesOffset === null || isNaN(props.extraSubtitlesOffset)
|
props.subtitlesOffset === null || isNaN(props.subtitlesOffset)
|
||||||
:
|
:
|
||||||
true
|
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||||
}
|
props.extraSubtitlesOffset === null || isNaN(props.extraSubtitlesOffset)
|
||||||
onChange={onSubtitlesOffsetChanged}
|
:
|
||||||
/>
|
true
|
||||||
|
}
|
||||||
|
onChange={onSubtitlesOffsetChanged}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,10 @@
|
||||||
.subtitles-settings-container {
|
.subtitles-settings-container {
|
||||||
width: 17rem;
|
width: 17rem;
|
||||||
|
|
||||||
|
.settings-list {
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
.spacing {
|
.spacing {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue