diff --git a/frontend/app/components/Session/LivePlayer.js b/frontend/app/components/Session/LivePlayer.js index ef4bda5ae..3d408866a 100644 --- a/frontend/app/components/Session/LivePlayer.js +++ b/frontend/app/components/Session/LivePlayer.js @@ -60,14 +60,14 @@ export default withRequest({ loadingName: 'loadingCredentials', })(withPermissions(['ASSIST_LIVE'], '', true)(connect( state => { - const isAssist = state.getIn(['sessions', 'activeTab']).type === 'live'; - const hasSessioPath = state.getIn([ 'sessions', 'sessionPath' ]).includes('/sessions'); + // const isAssist = state.getIn(['sessions', 'activeTab']).type === 'live'; + // const hasSessioPath = state.getIn([ 'sessions', 'sessionPath' ]).includes('/sessions'); return { session: state.getIn([ 'sessions', 'current' ]), showAssist: state.getIn([ 'sessions', 'showChatWindow' ]), jwt: state.get('jwt'), fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]), - hasSessionsPath: hasSessioPath && !isAssist, + // hasSessionsPath: hasSessioPath && !isAssist, isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee', hasErrors: !!state.getIn([ 'sessions', 'errors' ]), } diff --git a/frontend/app/components/Session_/Player/Controls/Controls.js b/frontend/app/components/Session_/Player/Controls/Controls.js index 464165e69..22fd3b0cf 100644 --- a/frontend/app/components/Session_/Player/Controls/Controls.js +++ b/frontend/app/components/Session_/Player/Controls/Controls.js @@ -106,7 +106,7 @@ function getStorageName(type) { bottomBlock: state.getIn([ 'components', 'player', 'bottomBlock' ]), showStorage: props.showStorage || !state.getIn(['components', 'player', 'hiddenHints', 'storage']), showStack: props.showStack || !state.getIn(['components', 'player', 'hiddenHints', 'stack']), - closedLive: !!state.getIn([ 'sessions', 'errors' ]), + closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !state.getIn([ 'sessions', 'current', 'live' ]), } }, { fullscreenOn, diff --git a/frontend/app/components/Session_/Player/Player.js b/frontend/app/components/Session_/Player/Player.js index a3a6e3b1a..8e9c38d2c 100644 --- a/frontend/app/components/Session_/Player/Player.js +++ b/frontend/app/components/Session_/Player/Player.js @@ -16,7 +16,7 @@ import EventsToggleButton from '../../Session/EventsToggleButton'; @connect(state => ({ fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]), nextId: state.getIn([ 'sessions', 'nextId' ]), - closedLive: !!state.getIn([ 'sessions', 'errors' ]), + closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !state.getIn([ 'sessions', 'current', 'live' ]), }), { hideTargetDefiner, fullscreenOff, diff --git a/frontend/app/components/Session_/PlayerBlock.js b/frontend/app/components/Session_/PlayerBlock.js index dec170e57..02ee08c75 100644 --- a/frontend/app/components/Session_/PlayerBlock.js +++ b/frontend/app/components/Session_/PlayerBlock.js @@ -33,7 +33,7 @@ import styles from './playerBlock.css'; @connect(state => ({ fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]), bottomBlock: state.getIn([ 'components', 'player', 'bottomBlock' ]), - closedLive: !!state.getIn([ 'sessions', 'errors' ]), + closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !state.getIn([ 'sessions', 'current', 'live' ]), })) export default class PlayerBlock extends React.PureComponent { componentDidUpdate(prevProps) { diff --git a/frontend/app/components/Session_/PlayerBlockHeader.js b/frontend/app/components/Session_/PlayerBlockHeader.js index e0883cc59..b6295ed70 100644 --- a/frontend/app/components/Session_/PlayerBlockHeader.js +++ b/frontend/app/components/Session_/PlayerBlockHeader.js @@ -29,10 +29,11 @@ const ASSIST_ROUTE = assistRoute(); loading: state.cssLoading || state.messagesLoading, })) @connect((state, props) => { - const isAssist = state.getIn(['sessions', 'activeTab']).type === 'live'; + const isAssist = window.location.pathname.includes('/assist/'); const hasSessioPath = state.getIn([ 'sessions', 'sessionPath' ]).includes('/sessions'); + const session = state.getIn([ 'sessions', 'current' ]); return { - session: state.getIn([ 'sessions', 'current' ]), + session, sessionPath: state.getIn([ 'sessions', 'sessionPath' ]), loading: state.getIn([ 'sessions', 'toggleFavoriteRequest', 'loading' ]), disabled: state.getIn([ 'components', 'targetDefiner', 'inspectorMode' ]) || props.loading, @@ -43,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' ]), + closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !session.live, } }, { toggleFavorite, fetchListIntegration, setSessionPath diff --git a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx index d6325ea00..8ffd256bd 100644 --- a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx +++ b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx @@ -13,6 +13,7 @@ import DropdownPlain from 'Shared/DropdownPlain'; import SortOrderButton from 'Shared/SortOrderButton'; import { TimezoneDropdown } from 'UI'; import { capitalize } from 'App/utils'; +import LiveSessionReloadButton from 'Shared/LiveSessionReloadButton'; const AUTOREFRESH_INTERVAL = .5 * 60 * 1000 const PER_PAGE = 20; @@ -107,8 +108,6 @@ function LiveSessionList(props: Props) { }, AUTOREFRESH_INTERVAL); } - console.log('srt', sort) - return (