,
+ },
{
key: ItemKey.Console,
label: 'Console',
@@ -70,6 +80,16 @@ const menuItems: MenuProps['items'] = [
label: 'Add Note',
icon:
,
},
+ {
+ key: ItemKey.CopySessionUrl,
+ label: 'Copy Session URL',
+ icon:
,
+ },
+ {
+ key: ItemKey.CopySessionUrlTs,
+ label: 'Copy Session URL At Current Time',
+ icon:
,
+ },
];
function Overlay({ nextId, isClickmap, toggleBottomBlock }: Props) {
@@ -127,6 +147,17 @@ function Overlay({ nextId, isClickmap, toggleBottomBlock }: Props) {
{ right: true, width: 380 }
);
break;
+ case ItemKey.CopySessionUrl:
+ copy(window.location.origin + window.location.pathname);
+ toast.success('Session URL copied to clipboard');
+ break;
+ case ItemKey.CopySessionUrlTs:
+ copy(window.location.origin
+ + window.location.pathname
+ + '?jumpto='
+ + String(Math.round(store.get().time)));
+ toast.success('Session URL at current time copied to clipboard');
+ break;
default:
return;
}
diff --git a/frontend/app/components/Session_/Player/player.module.css b/frontend/app/components/Session_/Player/player.module.css
index d03ab1bc1..d281b7c35 100644
--- a/frontend/app/components/Session_/Player/player.module.css
+++ b/frontend/app/components/Session_/Player/player.module.css
@@ -18,8 +18,7 @@
}
.checkers {
- background: repeating-conic-gradient($gray-lightest 0% 25%, transparent 0% 50%)
- 50% / 10px 10px;
+ background: repeating-linear-gradient(135deg, #f3f3f3, #f3f3f3 1px, #f6f6f6 1px, #FFF 4px);
}
.solidBg {
background: $gray-lightest;
diff --git a/frontend/app/components/Session_/Subheader.js b/frontend/app/components/Session_/Subheader.js
index 5b770b541..3c190cf75 100644
--- a/frontend/app/components/Session_/Subheader.js
+++ b/frontend/app/components/Session_/Subheader.js
@@ -95,7 +95,7 @@ function SubHeader(props) {
>
{showWarning ? (
{location && (
-
+
diff --git a/frontend/app/components/shared/SharePopup/SessionCopyLink/SessionCopyLink.tsx b/frontend/app/components/shared/SharePopup/SessionCopyLink/SessionCopyLink.tsx
index 9d9e49963..e408d683d 100644
--- a/frontend/app/components/shared/SharePopup/SessionCopyLink/SessionCopyLink.tsx
+++ b/frontend/app/components/shared/SharePopup/SessionCopyLink/SessionCopyLink.tsx
@@ -1,21 +1,18 @@
import React from 'react';
-import { connect } from 'react-redux';
import { Button, Icon } from 'UI';
import copy from 'copy-to-clipboard';
-import { PlayerContext } from 'App/components/Session/playerContext';
-import { observer } from 'mobx-react-lite';
-import { DateTime } from 'luxon';
-function SessionCopyLink({ startedAt }: any) {
+function SessionCopyLink({ time }: { time: number }) {
const [copied, setCopied] = React.useState(false);
- const { store } = React.useContext(PlayerContext);
-
- const time = store?.get().time;
const copyHandler = () => {
setCopied(true);
- const timeStr = DateTime.fromMillis(startedAt + time);
- copy(window.location.origin + window.location.pathname + '?jumpto=' + parseInt(String(timeStr.toMillis())));
+ copy(
+ window.location.origin
+ + window.location.pathname
+ + '?jumpto='
+ + Math.round(time)
+ );
setTimeout(() => {
setCopied(false);
}, 1000);
@@ -34,9 +31,4 @@ function SessionCopyLink({ startedAt }: any) {
);
}
-export default connect((state: any) => {
- return {
- time: state.time,
- startedAt: state.getIn(['sessions', 'current']).startedAt || 0,
- };
-})(observer(SessionCopyLink));
+export default SessionCopyLink;
diff --git a/frontend/app/components/shared/SharePopup/SharePopup.tsx b/frontend/app/components/shared/SharePopup/SharePopup.tsx
index ee55216ce..6ac06e4b9 100644
--- a/frontend/app/components/shared/SharePopup/SharePopup.tsx
+++ b/frontend/app/components/shared/SharePopup/SharePopup.tsx
@@ -10,6 +10,8 @@ import Select from 'Shared/Select';
import { fetchList as fetchSlack, sendSlackMsg } from 'Duck/integrations/slack';
import { fetchList as fetchTeams, sendMsTeamsMsg } from 'Duck/integrations/teams';
import { Button, Segmented } from 'antd';
+import { PlayerContext } from 'App/components/Session/playerContext';
+import { observer } from 'mobx-react-lite';
interface Msg {
integrationId: string;
@@ -25,6 +27,7 @@ const SharePopup = ({
trigger: string;
showCopyLink?: boolean;
}) => {
+ const { store } = React.useContext(PlayerContext);
const { showModal, hideModal } = useModal();
const openModal = () => {
@@ -32,6 +35,7 @@ const SharePopup = ({
,
{ right: true, width: 300 }
);
@@ -58,6 +62,7 @@ interface Props {
sendMsTeamsMsg: (msg: Msg) => any;
showCopyLink?: boolean;
hideModal: () => void;
+ time: number;
}
function ShareModalComp({
@@ -72,6 +77,7 @@ function ShareModalComp({
fetchSlack,
fetchTeams,
hideModal,
+ time,
}: Props) {
const [shareTo, setShareTo] = useState('slack');
const [comment, setComment] = useState('');
@@ -240,7 +246,7 @@ function ShareModalComp({
-
+