mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
fix(Player): hide indicator if subtitles menu is open
This commit is contained in:
parent
c2a2eca4e9
commit
4632d6e09a
2 changed files with 4 additions and 2 deletions
|
|
@ -22,9 +22,10 @@ type VideoState = Record<string, number>;
|
|||
type Props = {
|
||||
className: string,
|
||||
videoState: VideoState,
|
||||
disabled: boolean,
|
||||
};
|
||||
|
||||
const Indicator = ({ className, videoState }: Props) => {
|
||||
const Indicator = ({ className, videoState, disabled }: Props) => {
|
||||
const timeout = useRef<NodeJS.Timeout | null>(null);
|
||||
const prevVideoState = useRef<VideoState>(videoState);
|
||||
|
||||
|
|
@ -60,7 +61,7 @@ const Indicator = ({ className, videoState }: Props) => {
|
|||
}, [videoState]);
|
||||
|
||||
return (
|
||||
<Transition when={shown} name={'fade'}>
|
||||
<Transition when={shown && !disabled} name={'fade'}>
|
||||
<div className={classNames(className, styles['indicator-container'])}>
|
||||
<div className={styles['indicator']}>
|
||||
<div>{label} {value}</div>
|
||||
|
|
|
|||
|
|
@ -820,6 +820,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
<Indicator
|
||||
className={classnames(styles['layer'], styles['indicator-layer'])}
|
||||
videoState={video.state}
|
||||
disabled={subtitlesMenuOpen}
|
||||
/>
|
||||
{
|
||||
nextVideoPopupOpen ?
|
||||
|
|
|
|||
Loading…
Reference in a new issue