diff --git a/frontend/app/Router.tsx b/frontend/app/Router.tsx index e440b57d2..bdc52fc81 100644 --- a/frontend/app/Router.tsx +++ b/frontend/app/Router.tsx @@ -106,6 +106,9 @@ const Router: React.FC = (props) => { }; const handleUserLogin = async () => { + if (isSpotCb) { + localStorage.setItem(SPOT_ONBOARDING, 'true') + } await fetchUserInfo(); const siteIdFromPath = parseInt(location.pathname.split('/')[1]); await fetchSiteList(siteIdFromPath); @@ -114,8 +117,8 @@ const Router: React.FC = (props) => { const destinationPath = localStorage.getItem(GLOBAL_DESTINATION_PATH); if ( destinationPath && - destinationPath !== routes.login() && - destinationPath !== routes.signup() && + !destinationPath.includes(routes.login()) && + !destinationPath.includes(routes.signup()) && destinationPath !== '/' ) { const url = new URL(destinationPath, window.location.origin); @@ -152,10 +155,6 @@ const Router: React.FC = (props) => { useEffect(() => { if (prevIsLoggedIn !== isLoggedIn && isLoggedIn) { void handleUserLogin(); - if (spotCb) { - history.push(spotsList()) - localStorage.setItem(SPOT_ONBOARDING, 'true') - } } }, [isLoggedIn]); diff --git a/frontend/app/components/Spots/SpotPlayer/SpotPlayer.tsx b/frontend/app/components/Spots/SpotPlayer/SpotPlayer.tsx index b68f71fe6..8c94f3420 100644 --- a/frontend/app/components/Spots/SpotPlayer/SpotPlayer.tsx +++ b/frontend/app/components/Spots/SpotPlayer/SpotPlayer.tsx @@ -1,4 +1,3 @@ -import { Button, Card } from 'antd'; import cn from 'classnames'; import { observer } from 'mobx-react-lite'; import React from 'react'; @@ -6,16 +5,15 @@ import { connect } from 'react-redux'; import { useHistory, useParams } from 'react-router-dom'; import { useStore } from 'App/mstore'; -import { EscapeButton, Icon, Loader } from 'UI'; - -import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; - import { debounceUpdate, getDefaultPanelHeight, -} from '../../Session/Player/ReplayPlayer/PlayerInst'; -import { SpotOverviewPanelCont } from '../../Session_/OverviewPanel/OverviewPanel'; -import withPermissions from '../../hocs/withPermissions'; +} from 'Components/Session/Player/ReplayPlayer/PlayerInst'; +import { SpotOverviewPanelCont } from 'Components/Session_/OverviewPanel/OverviewPanel'; +import withPermissions from 'Components/hocs/withPermissions'; +import { EscapeButton, Loader } from 'UI'; + +import AccessError from './components/AccessError'; import SpotConsole from './components/Panels/SpotConsole'; import SpotNetwork from './components/Panels/SpotNetwork'; import SpotLocation from './components/SpotLocation'; @@ -38,9 +36,9 @@ function SpotPlayer({ loggedIn }: { loggedIn: boolean }) { React.useEffect(() => { if (spotStore.currentSpot) { - document.title = spotStore.currentSpot.title + ' - OpenReplay' + document.title = spotStore.currentSpot.title + ' - OpenReplay'; } - }, [spotStore.currentSpot]) + }, [spotStore.currentSpot]); React.useEffect(() => { if (!loggedIn) { const query = new URLSearchParams(window.location.search); @@ -160,39 +158,7 @@ function SpotPlayer({ loggedIn }: { loggedIn: boolean }) { 'w-screen h-screen flex items-center justify-center flex-col gap-2' } > - {spotStore.accessError ? ( - <> -
-
- - - -
- -
- The Spot link has expired. -
-

- Contact the person who shared it to re-spot. -

-
-
- -
-
- - ) : ( - - )} + {spotStore.accessError ? : } ); } @@ -323,7 +289,7 @@ const SpotOverviewConnector = observer(() => { const onClose = () => { spotPlayerStore.setActivePanel(null); - } + }; return ( +
+ + +
+ The Spot link has expired. +
+

+ Contact the person who shared it to re-spot. +

+
+
+ +
+
+ + ); +} + +export default AccessError; \ No newline at end of file diff --git a/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx b/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx index 8ae28610b..afba2afbc 100644 --- a/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx +++ b/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx @@ -188,7 +188,7 @@ function SpotVideoContainer({ {isProcessing ? ( } @@ -196,7 +196,7 @@ function SpotVideoContainer({ ) : prevIsProcessing ? ( void; selectedCount: number; onClearSelection: () => void; + onRefresh: () => void; isEmpty?: boolean; }) => { const { spotStore } = useStore(); @@ -47,6 +49,7 @@ const SpotsListHeader = observer(

Spot List

+
{isEmpty ? null : ( diff --git a/frontend/app/components/Spots/SpotsList/index.tsx b/frontend/app/components/Spots/SpotsList/index.tsx index fde706625..107e7e235 100644 --- a/frontend/app/components/Spots/SpotsList/index.tsx +++ b/frontend/app/components/Spots/SpotsList/index.tsx @@ -85,6 +85,7 @@ function SpotsList() { > void; iconSize?: number; - iconName?: string; - className?: string; + buttonSize: 'small' | 'middle' | 'large' | undefined; } export default function ReloadButton(props: Props) { - const { loading, onClick, iconSize = '20', iconName = 'arrow-repeat', className = '' } = props; + const { loading, onClick, iconSize = 18, buttonSize } = props; return ( - ); diff --git a/spot/entrypoints/popup/Settings.tsx b/spot/entrypoints/popup/Settings.tsx index c1bcd098d..ce24330c8 100644 --- a/spot/entrypoints/popup/Settings.tsx +++ b/spot/entrypoints/popup/Settings.tsx @@ -3,15 +3,13 @@ import orLogo from "@/assets/orSpot.svg"; import arrowLeft from "@/assets/arrow-left.svg"; function Settings({ goBack }: { goBack: () => void }) { - // State signals for various settings const [includeDevTools, setIncludeDevTools] = createSignal(true); const [openInNewTab, setOpenInNewTab] = createSignal(true); - const [showIngest, setShowIngest] = createSignal(true); + const [showIngest, setShowIngest] = createSignal(false); const [ingest, setIngest] = createSignal("https://app.openreplay.com"); const [editIngest, setEditIngest] = createSignal(false); const [tempIngest, setTempIngest] = createSignal(""); - // Fetch settings from Chrome local storage when the component mounts onMount(() => { chrome.storage.local.get("settings", (data: any) => { if (data.settings) { @@ -24,12 +22,11 @@ function Settings({ goBack }: { goBack: () => void }) { setTempIngest( data.settings.ingestPoint || "https://app.openreplay.com", ); - setEditIngest(!data.settings.ingestPoint); // Enter edit mode if no ingest point is configured + setEditIngest(!data.settings.ingestPoint); } }); }); - // Toggle for including DevTools (both Console Logs and Network Calls) const toggleIncludeDevTools = (e: Event) => { e.preventDefault(); e.stopPropagation(); @@ -41,7 +38,6 @@ function Settings({ goBack }: { goBack: () => void }) { }); }; - // Toggle for showing/hiding Ingest Point const toggleShowIngest = (e: Event) => { e.preventDefault(); e.stopPropagation(); @@ -53,7 +49,6 @@ function Settings({ goBack }: { goBack: () => void }) { }); }; - // Apply changes to the ingest point const applyIngest = () => { const val = tempIngest(); if (isValidUrl(val)) { @@ -111,7 +106,7 @@ function Settings({ goBack }: { goBack: () => void }) {
-
+

View Recording

@@ -165,8 +160,7 @@ function Settings({ goBack }: { goBack: () => void }) {

- The URL for sending website activity data, saving videos, sending - events, and opening the login screen. + Change this URL if you are using a self-hosted OpenReplay instance.

{showIngest() && ( diff --git a/spot/package.json b/spot/package.json index f5d2df044..7fee73f15 100644 --- a/spot/package.json +++ b/spot/package.json @@ -2,7 +2,7 @@ "name": "wxt-starter", "description": "manifest.json description", "private": true, - "version": "1.0.4", + "version": "1.0.5", "type": "module", "scripts": { "dev": "wxt",