diff --git a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx index b56236f9c..11e2863d9 100644 --- a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx +++ b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx @@ -4,7 +4,7 @@ import { connect } from 'react-redux' import cn from 'classnames' import { callPeer } from 'App/player'; import { toggleChatWindow } from 'Duck/sessions'; -// import stl from './AassistActions.css' +import stl from './AassistActions.css' interface Props { isLive: false; @@ -20,6 +20,7 @@ function AssistActions({ toggleChatWindow }: Props) { > +
Request Control diff --git a/frontend/app/components/BugFinder/LiveSessionList/LiveSessionList.tsx b/frontend/app/components/BugFinder/LiveSessionList/LiveSessionList.tsx index d545f49f1..d42de774b 100644 --- a/frontend/app/components/BugFinder/LiveSessionList/LiveSessionList.tsx +++ b/frontend/app/components/BugFinder/LiveSessionList/LiveSessionList.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react'; import { fetchLiveList } from 'Duck/sessions'; import { connect } from 'react-redux'; -import { NoContent } from 'UI'; +import { NoContent, Loader } from 'UI'; import { List } from 'immutable'; import SessionItem from 'Shared/SessionItem'; @@ -26,19 +26,22 @@ function LiveSessionList(props: Props) { icon="exclamation-circle" show={ !loading && list && list.size === 0} > - {list?.map(session => ( - - ))} + + {list?.map(session => ( + + ))} +
) } export default connect(state => ({ - list: state.getIn(['sessions', 'liveSessions']) + list: state.getIn(['sessions', 'liveSessions']), + loading: state.getIn([ 'sessions', 'loading' ]), }), { fetchLiveList })(LiveSessionList) diff --git a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js index f01b88f24..129862b29 100644 --- a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js +++ b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js @@ -73,15 +73,6 @@ function SessionsMenu(props) { ))}
-
- onMenuItemClick({ name: 'Bookmarks', type: 'bookmark' })} - /> -
-
onMenuItemClick({ name: 'Assist', type: 'live' })} />
+ +
+
+ onMenuItemClick({ name: 'Bookmarks', type: 'bookmark' })} + /> +
diff --git a/frontend/app/components/Session_/Player/Controls/Controls.js b/frontend/app/components/Session_/Player/Controls/Controls.js index 880a05402..9dde2669f 100644 --- a/frontend/app/components/Session_/Player/Controls/Controls.js +++ b/frontend/app/components/Session_/Player/Controls/Controls.js @@ -6,6 +6,7 @@ import { selectStorageType, selectStorageListNow, } from 'Player/store'; +import LiveTag from 'Shared/LiveTag'; import { Popup, Icon } from 'UI'; import { @@ -275,10 +276,11 @@ export default class Controls extends React.Component {
:
- + */} {'Elapsed'}
diff --git a/frontend/app/components/shared/LiveTag/LiveTag.css b/frontend/app/components/shared/LiveTag/LiveTag.css new file mode 100644 index 000000000..cecf45bad --- /dev/null +++ b/frontend/app/components/shared/LiveTag/LiveTag.css @@ -0,0 +1,33 @@ +@keyframes fade { + 0% { opacity: 1} + 50% { opacity: 0} + 100% { opacity: 1} +} + +.liveTag { + cursor: pointer; + user-select: none; + height: 26px; + width: 56px; + border-radius: 3px; + background-color: $gray-light; + display: flex; + align-items: center; + justify-content: center; + color: $gray-dark; + text-transform: uppercase; + font-size: 10px; + letter-spacing: 1px; + margin-right: 10px; + & svg { + fill: $gray-dark; + } + &[data-is-live=true] { + background-color: #42AE5E; + color: white; + & svg { + fill: white; + animation: fade 1s infinite; + } + } +} \ No newline at end of file diff --git a/frontend/app/components/shared/LiveTag/LiveTag.tsx b/frontend/app/components/shared/LiveTag/LiveTag.tsx new file mode 100644 index 000000000..8adfa398d --- /dev/null +++ b/frontend/app/components/shared/LiveTag/LiveTag.tsx @@ -0,0 +1,19 @@ +import React from 'react' +import { Icon } from 'UI' +import stl from './LiveTag.css' + +interface Props { + onClick: () => void, + isLive: Boolean +} + +function LiveTag({ isLive, onClick }: Props) { + return ( + + ) +} + +export default LiveTag diff --git a/frontend/app/components/shared/LiveTag/index.js b/frontend/app/components/shared/LiveTag/index.js new file mode 100644 index 000000000..3e91f2d0e --- /dev/null +++ b/frontend/app/components/shared/LiveTag/index.js @@ -0,0 +1 @@ +export { default } from './LiveTag' \ 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 f93aeefcf..cb72fbd41 100644 --- a/frontend/app/components/shared/SessionItem/SessionItem.js +++ b/frontend/app/components/shared/SessionItem/SessionItem.js @@ -14,6 +14,7 @@ import { toggleFavorite } from 'Duck/sessions'; import { session as sessionRoute } from 'App/routes'; import { durationFormatted, formatTimeOrDate } from 'App/date'; import stl from './sessionItem.css'; +import LiveTag from 'Shared/LiveTag'; const Label = ({ label = '', color = 'color-gray-medium'}) => (
{label}
@@ -51,7 +52,8 @@ export default class SessionItem extends React.PureComponent { favorite, userDeviceType, userUuid, - userNumericHash, + userNumericHash, + live }, timezone, onUserClick, @@ -89,18 +91,24 @@ export default class SessionItem extends React.PureComponent {
-
-
{ eventsCount }
-
+ {!live && ( +
+
{ eventsCount }
+
+ )}
-
-
{ errorsCount }
-
+ {!live && ( +
+
{ errorsCount }
+
+ )} + + { live && }
+ \ No newline at end of file diff --git a/frontend/app/svg/icons/telephone.svg b/frontend/app/svg/icons/telephone.svg index 8e359b825..0ec6550a4 100644 --- a/frontend/app/svg/icons/telephone.svg +++ b/frontend/app/svg/icons/telephone.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file