-
+
@@ -116,12 +120,17 @@ export default class PlayerBlockHeader extends React.PureComponent {
- { live &&
}
- { live &&
}
- { !live && (
+ { live && hasSessionsPath && (
+
this.props.setSessionPath('')}>
+ This Session is Now Continuing Live
+
+ )}
+ { _live &&
}
+ { _live &&
}
+ { !_live && (
<>
-
+
>
)}
- { !live && jiraConfig && jiraConfig.token &&
}
+ { !_live && jiraConfig && jiraConfig.token &&
}
diff --git a/frontend/app/components/Session_/playerBlockHeader.css b/frontend/app/components/Session_/playerBlockHeader.css
index 325e34256..d9934ef1e 100644
--- a/frontend/app/components/Session_/playerBlockHeader.css
+++ b/frontend/app/components/Session_/playerBlockHeader.css
@@ -12,3 +12,15 @@
background-color: $gray-light;
}
+.liveSwitchButton {
+ cursor: pointer;
+ padding: 3px 8px;
+ border: solid thin $green;
+ color: $green;
+ border-radius: 3px;
+ margin-right: 10px;
+ &:hover {
+ background-color: $green;
+ color: white;
+ }
+}
\ No newline at end of file
diff --git a/frontend/app/components/shared/SessionItem/SessionItem.js b/frontend/app/components/shared/SessionItem/SessionItem.js
index 301bf4463..c1c20fe13 100644
--- a/frontend/app/components/shared/SessionItem/SessionItem.js
+++ b/frontend/app/components/shared/SessionItem/SessionItem.js
@@ -10,21 +10,33 @@ import {
TextEllipsis
} from 'UI';
import { deviceTypeIcon } from 'App/iconNames';
-import { toggleFavorite } from 'Duck/sessions';
-import { session as sessionRoute } from 'App/routes';
+import { toggleFavorite, setSessionPath } from 'Duck/sessions';
+import { session as sessionRoute, withSiteId } from 'App/routes';
import { durationFormatted, formatTimeOrDate } from 'App/date';
import stl from './sessionItem.css';
import LiveTag from 'Shared/LiveTag';
import Bookmark from 'Shared/Bookmark';
import Counter from './Counter'
+import { withRouter } from 'react-router-dom';
const Label = ({ label = '', color = 'color-gray-medium'}) => (
{label}
)
@connect(state => ({
- timezone: state.getIn(['sessions', 'timezone'])
-}), { toggleFavorite })
+ timezone: state.getIn(['sessions', 'timezone']),
+ isAssist: state.getIn(['sessions', 'activeTab']).type === 'live',
+ siteId: state.getIn([ 'user', 'siteId' ]),
+}), { toggleFavorite, setSessionPath })
+@withRouter
export default class SessionItem extends React.PureComponent {
+
+ replaySession = () => {
+ const { history, session: { sessionId }, siteId, isAssist } = this.props;
+ if (!isAssist) {
+ this.props.setSessionPath(history.location.pathname)
+ }
+ history.push(withSiteId(sessionRoute(sessionId), siteId))
+ }
// eslint-disable-next-line complexity
render() {
const {
@@ -110,9 +122,9 @@ export default class SessionItem extends React.PureComponent {