mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +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 className={styles['subtitles-settings-container']}>
|
||||
<div className={styles['settings-header']}>Subtitles Settings</div>
|
||||
<DiscreteSelectInput
|
||||
className={styles['discrete-input']}
|
||||
label={t('DELAY')}
|
||||
value={typeof props.selectedExtraSubtitlesTrackId === 'string' && props.extraSubtitlesDelay !== null && !isNaN(props.extraSubtitlesDelay) ? `${(props.extraSubtitlesDelay / 1000).toFixed(2)}s` : '--'}
|
||||
disabled={typeof props.selectedExtraSubtitlesTrackId !== 'string' || props.extraSubtitlesDelay === null || isNaN(props.extraSubtitlesDelay)}
|
||||
onChange={onSubtitlesDelayChanged}
|
||||
/>
|
||||
<DiscreteSelectInput
|
||||
className={styles['discrete-input']}
|
||||
label={t('SIZE')}
|
||||
value={
|
||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||
props.subtitlesSize !== null && !isNaN(props.subtitlesSize) ? `${props.subtitlesSize}%` : '--'
|
||||
:
|
||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||
props.extraSubtitlesSize !== null && !isNaN(props.extraSubtitlesSize) ? `${props.extraSubtitlesSize}%` : '--'
|
||||
<div className={styles['settings-header']}>{t('PLAYER_SUBTITLES_SETTINGS')}</div>
|
||||
<div className={styles['settings-list']}>
|
||||
<DiscreteSelectInput
|
||||
className={styles['discrete-input']}
|
||||
label={t('DELAY')}
|
||||
value={typeof props.selectedExtraSubtitlesTrackId === 'string' && props.extraSubtitlesDelay !== null && !isNaN(props.extraSubtitlesDelay) ? `${(props.extraSubtitlesDelay / 1000).toFixed(2)}s` : '--'}
|
||||
disabled={typeof props.selectedExtraSubtitlesTrackId !== 'string' || props.extraSubtitlesDelay === null || isNaN(props.extraSubtitlesDelay)}
|
||||
onChange={onSubtitlesDelayChanged}
|
||||
/>
|
||||
<DiscreteSelectInput
|
||||
className={styles['discrete-input']}
|
||||
label={t('SIZE')}
|
||||
value={
|
||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||
props.subtitlesSize !== null && !isNaN(props.subtitlesSize) ? `${props.subtitlesSize}%` : '--'
|
||||
:
|
||||
'--'
|
||||
}
|
||||
disabled={
|
||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||
props.subtitlesSize === null || isNaN(props.subtitlesSize)
|
||||
:
|
||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||
props.extraSubtitlesSize === null || isNaN(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)
|
||||
:
|
||||
true
|
||||
}
|
||||
onChange={onSubtitlesSizeChanged}
|
||||
/>
|
||||
<DiscreteSelectInput
|
||||
className={styles['discrete-input']}
|
||||
label={t('PLAYER_SUBTITLES_VERTICAL_POSIITON')}
|
||||
value={
|
||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||
props.subtitlesOffset !== null && !isNaN(props.subtitlesOffset) ? `${props.subtitlesOffset}%` : '--'
|
||||
:
|
||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||
props.extraSubtitlesOffset !== null && !isNaN(props.extraSubtitlesOffset) ? `${props.extraSubtitlesOffset}%` : '--'
|
||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||
props.extraSubtitlesSize === null || isNaN(props.extraSubtitlesSize)
|
||||
:
|
||||
true
|
||||
}
|
||||
onChange={onSubtitlesSizeChanged}
|
||||
/>
|
||||
<DiscreteSelectInput
|
||||
className={styles['discrete-input']}
|
||||
label={t('PLAYER_SUBTITLES_VERTICAL_POSIITON')}
|
||||
value={
|
||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||
props.subtitlesOffset !== null && !isNaN(props.subtitlesOffset) ? `${props.subtitlesOffset}%` : '--'
|
||||
:
|
||||
'--'
|
||||
}
|
||||
disabled={
|
||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||
props.subtitlesOffset === null || isNaN(props.subtitlesOffset)
|
||||
:
|
||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||
props.extraSubtitlesOffset === null || isNaN(props.extraSubtitlesOffset)
|
||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||
props.extraSubtitlesOffset !== null && !isNaN(props.extraSubtitlesOffset) ? `${props.extraSubtitlesOffset}%` : '--'
|
||||
:
|
||||
'--'
|
||||
}
|
||||
disabled={
|
||||
typeof props.selectedSubtitlesTrackId === 'string' ?
|
||||
props.subtitlesOffset === null || isNaN(props.subtitlesOffset)
|
||||
:
|
||||
true
|
||||
}
|
||||
onChange={onSubtitlesOffsetChanged}
|
||||
/>
|
||||
typeof props.selectedExtraSubtitlesTrackId === 'string' ?
|
||||
props.extraSubtitlesOffset === null || isNaN(props.extraSubtitlesOffset)
|
||||
:
|
||||
true
|
||||
}
|
||||
onChange={onSubtitlesOffsetChanged}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -106,6 +106,10 @@
|
|||
.subtitles-settings-container {
|
||||
width: 17rem;
|
||||
|
||||
.settings-list {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.spacing {
|
||||
flex: 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue