fix(ui) - assist offline

This commit is contained in:
Shekar Siri 2022-02-24 18:34:15 +01:00
parent 37db48ceec
commit 09430d0868
3 changed files with 10 additions and 9 deletions

View file

@ -13,11 +13,14 @@ import EventsToggleButton from '../../Session/EventsToggleButton';
@connectPlayer(state => ({
live: state.live,
}))
@connect(state => ({
fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]),
nextId: state.getIn([ 'sessions', 'nextId' ]),
closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !state.getIn([ 'sessions', 'current', 'live' ]),
}), {
@connect(state => {
const isAssist = window.location.pathname.includes('/assist/');
return {
fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]),
nextId: state.getIn([ 'sessions', 'nextId' ]),
closedLive: !!state.getIn([ 'sessions', 'errors' ]) || (isAssist && !state.getIn([ 'sessions', 'current', 'live' ])),
}
}, {
hideTargetDefiner,
fullscreenOff,
})

View file

@ -33,7 +33,6 @@ import styles from './playerBlock.css';
@connect(state => ({
fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]),
bottomBlock: state.getIn([ 'components', 'player', 'bottomBlock' ]),
closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !state.getIn([ 'sessions', 'current', 'live' ]),
}))
export default class PlayerBlock extends React.PureComponent {
componentDidUpdate(prevProps) {
@ -44,14 +43,13 @@ export default class PlayerBlock extends React.PureComponent {
}
render() {
const { fullscreen, bottomBlock, closedLive } = this.props;
const { fullscreen, bottomBlock } = this.props;
return (
<div className={ cn(styles.playerBlock, "flex flex-col") }>
<Player
className="flex-1"
bottomBlockIsActive={ !fullscreen && bottomBlock !== NONE }
closedLive={closedLive}
/>
{ !fullscreen && !!bottomBlock &&
<div className="">

View file

@ -44,7 +44,7 @@ const ASSIST_ROUTE = assistRoute();
siteId: state.getIn([ 'user', 'siteId' ]),
hasSessionsPath: hasSessioPath && !isAssist,
metaList: state.getIn(['customFields', 'list']).map(i => i.key),
closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !session.live,
closedLive: !!state.getIn([ 'sessions', 'errors' ]) || (isAssist && !session.live),
}
}, {
toggleFavorite, fetchListIntegration, setSessionPath