diff --git a/frontend/app/components/Client/Integrations/Integrations.tsx b/frontend/app/components/Client/Integrations/Integrations.tsx index 96f3be099..2e8941cab 100644 --- a/frontend/app/components/Client/Integrations/Integrations.tsx +++ b/frontend/app/components/Client/Integrations/Integrations.tsx @@ -87,7 +87,7 @@ function Integrations(props: Props) {
{!hideHeader && Integrations
} />} {integrations.map((cat: any) => ( -
+
( ({ apiKey: state.getIn([ 'user', 'account', 'apiKey' ]), @@ -36,14 +36,7 @@ export default class Api extends React.PureComponent { readOnly={ true } value={ apiKey } leadingButton={ - + } /> diff --git a/frontend/app/components/Client/Users/UsersView.tsx b/frontend/app/components/Client/Users/UsersView.tsx index 6c4ab4707..5d514c0a8 100644 --- a/frontend/app/components/Client/Users/UsersView.tsx +++ b/frontend/app/components/Client/Users/UsersView.tsx @@ -11,52 +11,56 @@ import AddUserButton from './components/AddUserButton'; import withPageTitle from 'HOCs/withPageTitle'; interface Props { - isOnboarding?: boolean; - account: any; - isEnterprise: boolean; + isOnboarding?: boolean; + account: any; + isEnterprise: boolean; } function UsersView(props: Props) { - const { account, isEnterprise, isOnboarding = false } = props; - const { userStore, roleStore } = useStore(); - const userCount = useObserver(() => userStore.list.length); - const roles = useObserver(() => roleStore.list); - const { showModal } = useModal(); - const isAdmin = account.admin || account.superAdmin; + const { account, isEnterprise, isOnboarding = false } = props; + const { userStore, roleStore } = useStore(); + const userCount = useObserver(() => userStore.list.length); + const roles = useObserver(() => roleStore.list); + const { showModal } = useModal(); + const isAdmin = account.admin || account.superAdmin; - const editHandler = (user: any = null) => { - userStore.initUser(user).then(() => { - showModal(, { right: true }); - }); - }; + const editHandler = (user: any = null) => { + userStore.initUser(user).then(() => { + showModal(, { right: true }); + }); + }; - useEffect(() => { - if (roles.length === 0 && isEnterprise) { - roleStore.fetchRoles(); - } - }, []); + useEffect(() => { + if (roles.length === 0 && isEnterprise) { + roleStore.fetchRoles(); + } + }, []); - return ( -
-
- - Team {userCount} -
- } - /> -
- editHandler(null)} /> -
- -
+ return ( +
+
+ + Team {userCount}
- + } + /> +
+ editHandler(null)} + /> +
+ {!isOnboarding && }
- ); +
+ +
+ ); } export default connect((state: any) => ({ - account: state.getIn(['user', 'account']), - isEnterprise: state.getIn(['user', 'account', 'edition']) === 'ee', + account: state.getIn(['user', 'account']), + isEnterprise: state.getIn(['user', 'account', 'edition']) === 'ee', }))(withPageTitle('Team - OpenReplay Preferences')(UsersView)); diff --git a/frontend/app/components/Client/Users/components/AddUserButton/AddUserButton.tsx b/frontend/app/components/Client/Users/components/AddUserButton/AddUserButton.tsx index f9c500615..8330d5ed2 100644 --- a/frontend/app/components/Client/Users/components/AddUserButton/AddUserButton.tsx +++ b/frontend/app/components/Client/Users/components/AddUserButton/AddUserButton.tsx @@ -6,7 +6,7 @@ import { useObserver } from 'mobx-react-lite'; const PERMISSION_WARNING = 'You donโ€™t have the permissions to perform this action.'; const LIMIT_WARNING = 'You have reached users limit.'; -function AddUserButton({ isAdmin = false, onClick }: any) { +function AddUserButton({ isAdmin = false, onClick, btnVariant = 'primary' }: any) { const { userStore } = useStore(); const limtis = useObserver(() => userStore.limits); const cannAddUser = useObserver( @@ -17,7 +17,7 @@ function AddUserButton({ isAdmin = false, onClick }: any) { title={`${!isAdmin ? PERMISSION_WARNING : !cannAddUser ? LIMIT_WARNING : 'Add team member'}`} disabled={isAdmin || cannAddUser} > - diff --git a/frontend/app/components/Client/Users/components/UserList/UserList.tsx b/frontend/app/components/Client/Users/components/UserList/UserList.tsx index 2d828772e..8756de048 100644 --- a/frontend/app/components/Client/Users/components/UserList/UserList.tsx +++ b/frontend/app/components/Client/Users/components/UserList/UserList.tsx @@ -21,20 +21,17 @@ function UserList(props: Props) { const searchQuery = useObserver(() => userStore.searchQuery); const { showModal } = useModal(); - // const filterList = (list) => { - // const filterRE = getRE(searchQuery, 'i'); - // let _list = list.filter((w) => { - // return filterRE.test(w.email) || filterRE.test(w.roleName); - // }); - // return _list; - // }; - const getList = (list) => filterList(list, searchQuery, ['email', 'roleName', 'name']) + const getList = (list: any) => filterList(list, searchQuery, ['email', 'roleName', 'name']) const list: any = searchQuery !== '' ? getList(users) : users; const length = list.length; useEffect(() => { userStore.fetchUsers(); + + return () => { + userStore.updateKey('page', 1) + } }, []); const editHandler = (user: any) => { diff --git a/frontend/app/components/Errors/Error/ErrorInfo.js b/frontend/app/components/Errors/Error/ErrorInfo.js index abfa4e76b..6b5b08c0c 100644 --- a/frontend/app/components/Errors/Error/ErrorInfo.js +++ b/frontend/app/components/Errors/Error/ErrorInfo.js @@ -77,8 +77,8 @@ export default class ErrorInfo extends React.PureComponent { subtext="Please try to find existing one." show={!loading && errorIdInStore == null} > -
- +
+ diff --git a/frontend/app/components/Onboarding/components/IdentifyUsersTab/IdentifyUsersTab.tsx b/frontend/app/components/Onboarding/components/IdentifyUsersTab/IdentifyUsersTab.tsx index 6c6083f03..38587d9b4 100644 --- a/frontend/app/components/Onboarding/components/IdentifyUsersTab/IdentifyUsersTab.tsx +++ b/frontend/app/components/Onboarding/components/IdentifyUsersTab/IdentifyUsersTab.tsx @@ -5,15 +5,24 @@ import { HighlightCode, Icon, Button } from 'UI'; import DocCard from 'Shared/DocCard/DocCard'; import withOnboarding, { WithOnboardingProps } from '../withOnboarding'; import { OB_TABS } from 'App/routes'; +import withPageTitle from 'App/components/hocs/withPageTitle'; interface Props extends WithOnboardingProps {} function IdentifyUsersTab(props: Props) { return ( <> -

- ๐Ÿ•ต๏ธโ€โ™‚๏ธ -
Identify Users
+

+
+ ๐Ÿ•ต๏ธโ€โ™‚๏ธ +
Identify Users
+
+ + + +

@@ -31,9 +40,24 @@ function IdentifyUsersTab(props: Props) {
-
+
+
+ + Make it easy to search and filter replays by user id. OpenReplay allows you to associate + your internal-user-id with the recording. + +
+
-
+
+ +
+
Identify users by adding metadata

@@ -48,7 +72,7 @@ function IdentifyUsersTab(props: Props) {

-
+
Inject metadata when recording sessions
Use the setMetadata method in your code to @@ -59,18 +83,7 @@ function IdentifyUsersTab(props: Props) {
-
- - Make it easy to search and filter replays by user id. OpenReplay allows you to associate - your internal-user-id with the recording. - - Additional information about users can be provided with metadata (also known as traits or user variables). They take the form of key/value pairs, and are useful for filtering @@ -96,4 +109,4 @@ function IdentifyUsersTab(props: Props) { ); } -export default withOnboarding(IdentifyUsersTab); +export default withOnboarding(withPageTitle("Identify Users - OpenReplay")(IdentifyUsersTab)); diff --git a/frontend/app/components/Onboarding/components/InstallOpenReplayTab/InstallOpenReplayTab.tsx b/frontend/app/components/Onboarding/components/InstallOpenReplayTab/InstallOpenReplayTab.tsx index c09506a28..e7f0e5cee 100644 --- a/frontend/app/components/Onboarding/components/InstallOpenReplayTab/InstallOpenReplayTab.tsx +++ b/frontend/app/components/Onboarding/components/InstallOpenReplayTab/InstallOpenReplayTab.tsx @@ -5,6 +5,7 @@ import { Button, Icon } from 'UI'; import withOnboarding from '../withOnboarding'; import { WithOnboardingProps } from '../withOnboarding'; import { OB_TABS } from 'App/routes'; +import withPageTitle from 'App/components/hocs/withPageTitle'; interface Props extends WithOnboardingProps {} @@ -20,9 +21,10 @@ function InstallOpenReplayTab(props: Props) {
- - - Setup Guide + +
@@ -46,4 +48,4 @@ function InstallOpenReplayTab(props: Props) { ); } -export default withOnboarding(InstallOpenReplayTab); +export default withOnboarding(withPageTitle("Project Setup - OpenReplay")(InstallOpenReplayTab)); diff --git a/frontend/app/components/Onboarding/components/IntegrationsTab/IntegrationsTab.tsx b/frontend/app/components/Onboarding/components/IntegrationsTab/IntegrationsTab.tsx index dc549e74f..831451bfa 100644 --- a/frontend/app/components/Onboarding/components/IntegrationsTab/IntegrationsTab.tsx +++ b/frontend/app/components/Onboarding/components/IntegrationsTab/IntegrationsTab.tsx @@ -2,32 +2,25 @@ import React from 'react'; import { Button } from 'UI'; import Integrations from 'App/components/Client/Integrations/Integrations'; import withOnboarding, { WithOnboardingProps } from '../withOnboarding'; +import withPageTitle from 'App/components/hocs/withPageTitle'; interface Props extends WithOnboardingProps {} function IntegrationsTab(props: Props) { return ( <> -

- ๐Ÿ”Œ -
Integrations
-

- - {/*
-
-
Why Use Plugins?
-
- Reproduce issues as if they happened in your own browser. Plugins help capture your - applicationโ€™s store, HTTP requests, GraphQL queries and more. -
+

+
+ ๐Ÿ”Œ +
Integrations
-
-
Why Use Integrations?
-
- Sync your backend errors with sessions replays and see what happened front-to-back. -
-
-

*/} + + + + +
+
@@ -50,4 +62,4 @@ function ManageUsersTab(props: Props) { ); } -export default withOnboarding(ManageUsersTab); +export default withOnboarding(withPageTitle('Invite Collaborators - OpenReplay')(ManageUsersTab)); diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js index ad1307888..205cab5fa 100644 --- a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js +++ b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js @@ -1,20 +1,20 @@ -import React, { useState } from 'react' -import { connect } from 'react-redux' -import stl from './installDocs.module.css' -import cn from 'classnames' -import Highlight from 'react-highlight' -import CircleNumber from '../../CircleNumber' -import { CopyButton } from 'UI' +import React, { useState } from 'react'; +import { connect } from 'react-redux'; +import stl from './installDocs.module.css'; +import cn from 'classnames'; +import Highlight from 'react-highlight'; +import CircleNumber from '../../CircleNumber'; +import { CopyButton } from 'UI'; import { Toggler } from 'UI'; -const installationCommand = 'npm i @openreplay/tracker' +const installationCommand = 'npm i @openreplay/tracker'; const usageCode = `import Tracker from '@openreplay/tracker'; const tracker = new Tracker({ projectKey: "PROJECT_KEY", ingestPoint: "https://${window.location.hostname}/ingest", }); -tracker.start();` +tracker.start();`; const usageCodeSST = `import Tracker from '@openreplay/tracker/cjs'; const tracker = new Tracker({ @@ -28,12 +28,12 @@ function MyApp() { }, []); //... -}` +}`; function InstallDocs({ site }) { - const _usageCode = usageCode.replace('PROJECT_KEY', site.projectKey) - const _usageCodeSST = usageCodeSST.replace('PROJECT_KEY', site.projectKey) - const [isSpa, setIsSpa] = useState(true) + const _usageCode = usageCode.replace('PROJECT_KEY', site.projectKey); + const _usageCodeSST = usageCodeSST.replace('PROJECT_KEY', site.projectKey); + const [isSpa, setIsSpa] = useState(true); return (
@@ -41,61 +41,69 @@ function InstallDocs({ site }) { Install the npm package.
-
- - - {installationCommand} - +
+
+ +
+ {installationCommand}
- Continue with one of the following options. + Continue with one of the following options.
-
setIsSpa(!isSpa)}>Server-Side-Rendered (SSR)?
+
setIsSpa(!isSpa)}> + Server-Side-Rendered (SSR)? +
setIsSpa(!isSpa) } + onChange={() => setIsSpa(!isSpa)} // style={{ lineHeight: '23px' }} />
- +
{isSpa && (
-
If your website is a Single Page Application (SPA) use the below code:
-
- - - {_usageCode} - +
+ If your website is a Single Page Application (SPA) use the below + code: +
+
+
+ +
+ {_usageCode}
)} {!isSpa && (
-
Otherwise, if your web app is Server-Side-Rendered (SSR) (i.e. NextJS, NuxtJS) use this snippet:
-
- - - {_usageCodeSST} - +
+ Otherwise, if your web app is Server-Side-Rendered (SSR) (i.e. + NextJS, NuxtJS) use this snippet: +
+
+
+ +
+ {_usageCodeSST}
)} -
+
- ) + ); } -export default connect(state => ({ - site: state.getIn([ 'site', 'instance' ]), -}))(InstallDocs) \ No newline at end of file +export default connect((state) => ({ + site: state.getIn(['site', 'instance']), +}))(InstallDocs); diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.js b/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.js index 5204d9c5d..831f962b6 100644 --- a/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.js +++ b/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.js @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { editGDPR, saveGDPR, init } from 'Duck/site'; -import { Checkbox, Toggler } from 'UI'; +import { Checkbox, Loader, Toggler } from 'UI'; import GDPR from 'Types/site/gdpr'; import cn from 'classnames'; import stl from './projectCodeSnippet.module.css'; @@ -23,6 +23,7 @@ const ProjectCodeSnippet = (props) => { const { gdpr } = props.site; const [changed, setChanged] = useState(false); const [isAssistEnabled, setAssistEnabled] = useState(false); + const [showLoader, setShowLoader] = useState(false); useEffect(() => { const site = props.sites.find((s) => s.id === props.siteId); @@ -50,6 +51,14 @@ const ProjectCodeSnippet = (props) => { saveGDPR(_gdpr); }; + useEffect(() => { + // show loader for 500 milliseconds + setShowLoader(true); + setTimeout(() => { + setShowLoader(false); + }, 200); + }, [isAssistEnabled]); + return (
@@ -130,15 +139,21 @@ const ProjectCodeSnippet = (props) => { {' tag of your page.'}
- + {showLoader ? ( +
+ +
+ ) : ( + + )}
); diff --git a/frontend/app/components/Onboarding/components/ProjectFormButton/ProjectFormButton.js b/frontend/app/components/Onboarding/components/ProjectFormButton/ProjectFormButton.js index 678d86559..da9f4211b 100644 --- a/frontend/app/components/Onboarding/components/ProjectFormButton/ProjectFormButton.js +++ b/frontend/app/components/Onboarding/components/ProjectFormButton/ProjectFormButton.js @@ -17,7 +17,7 @@ const ProjectFormButton = ({ sites, siteId, init }) => { return ( <> openModal(e)} > {site && site.name} diff --git a/frontend/app/components/Onboarding/components/SideMenu.tsx b/frontend/app/components/Onboarding/components/SideMenu.tsx index fc7c5af80..d2176103d 100644 --- a/frontend/app/components/Onboarding/components/SideMenu.tsx +++ b/frontend/app/components/Onboarding/components/SideMenu.tsx @@ -21,7 +21,7 @@ function SideMenu(props: Props) {
props.onClick(OB_TABS.INSTALLING)} diff --git a/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js b/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js index ef80fd0bf..7b295d94b 100644 --- a/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js +++ b/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js @@ -77,7 +77,7 @@ function UserCard({ className, request, session, width, height, similarSessions, · ( -
+
} label={countries[userCountry]} diff --git a/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx b/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx index 7fc8eabe3..fd6c8e3e8 100644 --- a/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx +++ b/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx @@ -83,7 +83,7 @@ function PlayerBlockHeader(props: any) { onClick={backHandler} > {/* @ts-ignore TODO */} - +
)} diff --git a/frontend/app/components/Session/Player/ReplayPlayer/playerBlockHeader.module.css b/frontend/app/components/Session/Player/ReplayPlayer/playerBlockHeader.module.css index 29c6e1648..fe670cc22 100644 --- a/frontend/app/components/Session/Player/ReplayPlayer/playerBlockHeader.module.css +++ b/frontend/app/components/Session/Player/ReplayPlayer/playerBlockHeader.module.css @@ -1,7 +1,6 @@ .header { height: 50px; border-bottom: solid thin $gray-light; - padding-left: 15px; padding-right: 0; background-color: white; } diff --git a/frontend/app/components/Session_/Player/Controls/Controls.tsx b/frontend/app/components/Session_/Player/Controls/Controls.tsx index 0ee93cf92..78c8fd59e 100644 --- a/frontend/app/components/Session_/Player/Controls/Controls.tsx +++ b/frontend/app/components/Session_/Player/Controls/Controls.tsx @@ -163,7 +163,7 @@ function Controls(props: any) { disabled={disabled} backTenSeconds={backTenSeconds} forthTenSeconds={forthTenSeconds} - toggleSpeed={() => player.toggleSpeed()} + toggleSpeed={(speedIndex) => player.toggleSpeed(speedIndex)} toggleSkip={() => player.toggleSkip()} playButton={} skipIntervals={SKIP_INTERVALS} diff --git a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx index a1562ac4d..414caf9f8 100644 --- a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx @@ -4,7 +4,8 @@ import cn from 'classnames'; import { ReduxTime } from '../Time'; // @ts-ignore import styles from '../controls.module.css'; -import { SkipButton } from 'App/player-ui' +import { SkipButton } from 'App/player-ui'; +import { SPEED_OPTIONS } from 'App/player/player/Player'; interface Props { skip: boolean; @@ -16,7 +17,7 @@ interface Props { setSkipInterval: (interval: number) => void; backTenSeconds: () => void; forthTenSeconds: () => void; - toggleSpeed: () => void; + toggleSpeed: (speedIndex: number) => void; toggleSkip: () => void; } @@ -79,7 +80,6 @@ function PlayerControls(props: Props) {
-
{/* @ts-ignore */} -
- -
-
- {/* @ts-ignore */} - - - -
- -
- +
+
+ {/* @ts-ignore */} + ( +
+
+ Playback speed +
+ {Object.keys(SPEED_OPTIONS).map((index: any) => ( +
{ + close(); + toggleSpeed(index); + }} + className={cn( + 'py-2 px-4 cursor-pointer w-full text-left font-semibold', + 'hover:bg-active-blue border-t border-borderColor-gray-light-shade' + )} + > + {SPEED_OPTIONS[index]} + x +
+ ))} +
+ )} + > +
+ + + +
+
+
+ +
); } diff --git a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx index d79a64b5c..793d84601 100644 --- a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx +++ b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx @@ -6,6 +6,7 @@ import { Button, Link, Icon } from 'UI'; import { session as sessionRoute, withSiteId } from 'App/routes'; import stl from './AutoplayTimer.module.css'; import clsOv from './overlay.module.css'; +import AutoplayToggle from 'Shared/AutoplayToggle'; interface IProps extends RouteComponentProps { nextId: number; @@ -40,20 +41,28 @@ function AutoplayTimer({ nextId, siteId, history }: IProps) { return (
-
-
Next recording will be played in {counter}s
-
- -
- - - +
+
+ Autoplaying next session in {counter} seconds
-
+ +
+
+ +
+
+ +
+ + + +
+
+ {/*
Turn on/off auto-replay in More options -
+
*/}
); diff --git a/frontend/app/components/Session_/Subheader.js b/frontend/app/components/Session_/Subheader.js index 8c87cd184..191dbebf1 100644 --- a/frontend/app/components/Session_/Subheader.js +++ b/frontend/app/components/Session_/Subheader.js @@ -107,7 +107,7 @@ function SubHeader(props) { {location && ( <>
{ copy(currentLocation); setCopied(true); diff --git a/frontend/app/components/Session_/components/HeaderMenu.tsx b/frontend/app/components/Session_/components/HeaderMenu.tsx index 9d70d8aab..960b4a62f 100644 --- a/frontend/app/components/Session_/components/HeaderMenu.tsx +++ b/frontend/app/components/Session_/components/HeaderMenu.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Button } from 'UI'; +import { Button, Icon } from 'UI'; import styles from './menu.module.css'; import cn from 'classnames'; import OutsideClickDetectingDiv from 'Shared/OutsideClickDetectingDiv'; @@ -42,8 +42,11 @@ export default class ItemMenu extends React.PureComponent { return (
-
{items.map((item) => diff --git a/frontend/app/components/Session_/components/NotePopup.tsx b/frontend/app/components/Session_/components/NotePopup.tsx index ae13d7b3a..6ba13da30 100644 --- a/frontend/app/components/Session_/components/NotePopup.tsx +++ b/frontend/app/components/Session_/components/NotePopup.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { Button } from 'UI'; import { connect } from 'react-redux'; import { setCreateNoteTooltip } from 'Duck/sessions'; -import GuidePopup from 'Shared/GuidePopup'; import { PlayerContext } from 'App/components/Session/playerContext'; function NotePopup({ @@ -12,7 +11,7 @@ function NotePopup({ setCreateNoteTooltip: (args: any) => void; tooltipActive: boolean; }) { - const { player, store } = React.useContext(PlayerContext) + const { player, store } = React.useContext(PlayerContext); const toggleNotePopup = () => { if (tooltipActive) return; @@ -25,14 +24,9 @@ function NotePopup({ }, []); return ( - - - + ); } diff --git a/frontend/app/components/Session_/components/menu.module.css b/frontend/app/components/Session_/components/menu.module.css index be06d9133..edbe4ea72 100644 --- a/frontend/app/components/Session_/components/menu.module.css +++ b/frontend/app/components/Session_/components/menu.module.css @@ -39,7 +39,7 @@ } white-space: nowrap; - z-index: 20; + z-index: 9999; position: absolute; right: 0px; top: 37px; diff --git a/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx b/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx index 55bef3709..463ceff9d 100644 --- a/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx +++ b/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx @@ -3,20 +3,16 @@ import { Toggler } from 'UI'; import { PlayerContext } from 'App/components/Session/playerContext'; import { observer } from 'mobx-react-lite'; -interface Props { - toggleAutoplay: () => void; - autoplay: boolean; -} -function AutoplayToggle(props: Props) { +function AutoplayToggle() { const { player, store } = React.useContext(PlayerContext) - const { autoplay } = store.get() + return (
player.toggleAutoplay()} className="cursor-pointer flex items-center mr-2 hover:bg-gray-light-shade rounded-md p-2" > - + player.toggleAutoplay()} checked={autoplay} /> Auto-Play
); diff --git a/frontend/app/components/shared/SessionSettings/components/DefaultTimezone.tsx b/frontend/app/components/shared/SessionSettings/components/DefaultTimezone.tsx index dc14f6245..503ca5f3b 100644 --- a/frontend/app/components/shared/SessionSettings/components/DefaultTimezone.tsx +++ b/frontend/app/components/shared/SessionSettings/components/DefaultTimezone.tsx @@ -6,47 +6,78 @@ import { Timezone } from 'App/mstore/types/sessionSettings'; import { useObserver } from 'mobx-react-lite'; import { toast } from 'react-toastify'; -type TimezonesDropdown = Timezone[] +type TimezonesDropdown = Timezone[]; function DefaultTimezone() { - const [changed, setChanged] = React.useState(false); - const { settingsStore } = useStore(); - const timezoneOptions: TimezonesDropdown = settingsStore.sessionSettings.defaultTimezones; - const [timezone, setTimezone] = React.useState(settingsStore.sessionSettings.timezone); - const sessionSettings = useObserver(() => settingsStore.sessionSettings); + const [changed, setChanged] = React.useState(false); + const { settingsStore } = useStore(); + const timezoneOptions: TimezonesDropdown = settingsStore.sessionSettings.defaultTimezones; + const [timezone, setTimezone] = React.useState(settingsStore.sessionSettings.timezone); + const sessionSettings = useObserver(() => settingsStore.sessionSettings); - useEffect(() => { - if (!timezone) setTimezone({ label: 'Local Timezone', value: 'system' }); - }, []); + useEffect(() => { + if (!timezone) setTimezone({ label: 'Local Timezone', value: 'system' }); + }, []); - const onSelectChange = ({ value }: { value: Timezone }) => { - setTimezone(value); - setChanged(true); - } - const onTimezoneSave = () => { - setChanged(false); - sessionSettings.updateKey('timezone', timezone); - toast.success("Default timezone saved successfully"); - } - - return ( - <> -

Default Timezone

-
Session Time
-
- option.value === timezone.value)} + onChange={onSelectChange} + /> +
+ +
+
+ +
+ Apply my current timezone +
+ + ); } export default DefaultTimezone; diff --git a/frontend/app/components/shared/SharePopup/SharePopup.js b/frontend/app/components/shared/SharePopup/SharePopup.js index 07726d14a..2c0bc643e 100644 --- a/frontend/app/components/shared/SharePopup/SharePopup.js +++ b/frontend/app/components/shared/SharePopup/SharePopup.js @@ -78,10 +78,7 @@ export default class SharePopup extends React.PureComponent { }; handleSuccess = (endpoint) => { - const obj = - endpoint === 'Slack' - ? { loadingSlack: false } - : { loadingTeams: false }; + const obj = endpoint === 'Slack' ? { loadingSlack: false } : { loadingTeams: false }; this.setState(obj); toast.success(`Sent to ${endpoint}.`); }; @@ -114,7 +111,7 @@ export default class SharePopup extends React.PureComponent {
{this.state.loadingTeams || this.state.loadingSlack ? ( - ) :( + ) : ( <>
@@ -139,24 +136,21 @@ export default class SharePopup extends React.PureComponent { {slackOptions.length > 0 && ( <> Share to slack -
+
{this.state.teamsChannel && ( - )}
diff --git a/frontend/app/components/shared/UserSessionsModal/UserSessionsModal.tsx b/frontend/app/components/shared/UserSessionsModal/UserSessionsModal.tsx index 0c8b1b480..0777d9925 100644 --- a/frontend/app/components/shared/UserSessionsModal/UserSessionsModal.tsx +++ b/frontend/app/components/shared/UserSessionsModal/UserSessionsModal.tsx @@ -46,7 +46,7 @@ function UserSessionsModal(props: Props) { useEffect(fetchData, [filter.page, filter.startDate, filter.endDate]); return ( -
+
@@ -66,7 +66,7 @@ function UserSessionsModal(props: Props) {
No recordings found.
}> -
+
{data.sessions.map((session: any) => (
diff --git a/frontend/app/components/ui/CopyButton/CopyButton.js b/frontend/app/components/ui/CopyButton/CopyButton.js index bb231cdb3..607e6272f 100644 --- a/frontend/app/components/ui/CopyButton/CopyButton.js +++ b/frontend/app/components/ui/CopyButton/CopyButton.js @@ -17,7 +17,7 @@ function CopyButton({ content, variant="text-primary", className = '', btnText return (