diff --git a/frontend/app/components/Client/Projects/ProjectCodeSnippet.tsx b/frontend/app/components/Client/Projects/ProjectCodeSnippet.tsx index e48764f39..5cc119380 100644 --- a/frontend/app/components/Client/Projects/ProjectCodeSnippet.tsx +++ b/frontend/app/components/Client/Projects/ProjectCodeSnippet.tsx @@ -1,7 +1,8 @@ import React, { useEffect, useState } from 'react'; import { useStore } from 'App/mstore'; import { observer } from 'mobx-react-lite'; -import { Checkbox, Loader, Toggler } from 'UI'; +import { Loader } from 'UI'; +import { Switch, Checkbox, Tag } from 'antd'; import GDPR from 'App/mstore/types/gdpr'; import cn from 'classnames'; import stl from './projectCodeSnippet.module.css'; @@ -18,7 +19,7 @@ interface InputModeOption { const inputModeOptions: InputModeOption[] = [ { label: 'Record all inputs', value: 'plain' }, { label: 'Ignore all inputs', value: 'obscured' }, - { label: 'Obscure all inputs', value: 'hidden' } + { label: 'Obscure all inputs', value: 'hidden' }, ]; const inputModeOptionsMap: Record = {}; @@ -28,7 +29,7 @@ interface Props { project: Project; } -const ProjectCodeSnippet: React.FC = (props: Props) => { +const ProjectCodeSnippet: React.FC = (props) => { const { projectsStore } = useStore(); const siteId = projectsStore.siteId; const site = props.project; @@ -58,8 +59,7 @@ const ProjectCodeSnippet: React.FC = (props: Props) => { saveGDPR(); }; - const onChangeOption = (event: React.ChangeEvent) => { - const { name, checked } = event.target; + const onChangeOption = (name: string, checked: boolean) => { editGDPR({ [name]: checked }); saveGDPR(); }; @@ -73,13 +73,14 @@ const ProjectCodeSnippet: React.FC = (props: Props) => { }, [isAssistEnabled]); return ( -
-
-
- Choose data recording options +
+
+
+ + Choose data recording options
-
+
- +
+
+ +
{project.exists() && ( + + )}
diff --git a/frontend/app/components/Client/Projects/ProjectList.tsx b/frontend/app/components/Client/Projects/ProjectList.tsx index 8d5e9774f..3b47858bd 100644 --- a/frontend/app/components/Client/Projects/ProjectList.tsx +++ b/frontend/app/components/Client/Projects/ProjectList.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Avatar, Button, Input, Menu, MenuProps, Progress, Typography } from 'antd'; +import { Avatar, Button, Input, Menu, MenuProps, Progress, Typography, Tooltip } from 'antd'; import { useStore } from '@/mstore'; import Project from '@/mstore/types/project'; import { observer } from 'mobx-react-lite'; -import { AppWindowMac, EditIcon, Smartphone } from 'lucide-react'; -import { PencilIcon } from '.store/lucide-react-virtual-3cff663764/package'; +import { AppWindowMac, EditIcon, Smartphone, } from 'lucide-react'; +import {PlusOutlined, SearchOutlined, EditOutlined} from '@ant-design/icons' import ProjectForm from 'Components/Client/Projects/ProjectForm'; import { useModal } from 'Components/ModalContext'; @@ -41,7 +41,7 @@ const ProjectList: React.FC = () => { key: project.id + '', label: {project.name}, extra: + + } onChange={(e) => setSearch(e.target.value)} allowClear + className='rounded-lg' />
@@ -84,6 +95,7 @@ const ProjectIconWithProgress: React.FC<{ platform: string; progress: number; }> = ({ platform, progress }) => ( +
+ ); diff --git a/frontend/app/components/Client/Projects/ProjectTabTracking.tsx b/frontend/app/components/Client/Projects/ProjectTabTracking.tsx index fce397b8c..bb73e5a7a 100644 --- a/frontend/app/components/Client/Projects/ProjectTabTracking.tsx +++ b/frontend/app/components/Client/Projects/ProjectTabTracking.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Project from '@/mstore/types/project'; import { Tabs } from 'UI'; - +import {AppleOutlined, AndroidOutlined, CodeOutlined, JavaScriptOutlined} from '@ant-design/icons'; import usePageTitle from '@/hooks/usePageTitle'; import InstallDocs from 'Components/Onboarding/components/OnboardingTabs/InstallDocs'; import ProjectCodeSnippet from 'Components/Client/Projects/ProjectCodeSnippet'; @@ -41,18 +41,32 @@ function WebSnippet({ project }: { project: Project }) { const [isNpm, setIsNpm] = React.useState(true); return ( -
+
+ options={[ + { + label: ( +
+ + NPM +
+ ), + value: true, + }, + { + label: ( +
+ + Script +
+ ), + value: false, + }, + ]} + value={isNpm} + onChange={setIsNpm} + className="!align-middle text-center rounded-lg" +/> {isNpm ? ( @@ -68,25 +82,39 @@ function MobileSnippet({ project }: { project: Project }) { const ingestPoint = `https://${window.location.hostname}/ingest`; return ( -
+
+ + iOS +
+ ), + value: true, + }, + { + label: ( +
+ + Android +
+ ), + value: false, + }, ]} value={isIos} onChange={setIsIos} - block={true} - style={{ maxWidth: '150px' }} - className="!align-middle" + className='rounded-lg' /> - - + {isIos ? ( ) : ( )} +
); } diff --git a/frontend/app/components/Client/Projects/Projects.tsx b/frontend/app/components/Client/Projects/Projects.tsx index c091af680..497e5cd20 100644 --- a/frontend/app/components/Client/Projects/Projects.tsx +++ b/frontend/app/components/Client/Projects/Projects.tsx @@ -37,25 +37,16 @@ function Projects() { history.push({ search: params.toString() }); }, [pid, tab]); - const createProject = () => { - openModal(, { - title: 'New Project' - }); - }; return ( Projects} - extra={[ - - ]} >
+ className="capitalize !m-0 whitespace-nowrap truncate !font-medium"> {project?.name} @@ -77,10 +68,10 @@ function Projects() { {project && } diff --git a/frontend/app/components/Client/Projects/projectCodeSnippet.module.css b/frontend/app/components/Client/Projects/projectCodeSnippet.module.css index 610a3a4d7..4a2bcacae 100644 --- a/frontend/app/components/Client/Projects/projectCodeSnippet.module.css +++ b/frontend/app/components/Client/Projects/projectCodeSnippet.module.css @@ -84,7 +84,6 @@ .info { padding: 5px 10px; - background-color: #ffedd1; } .number { diff --git a/frontend/app/components/Onboarding/components/CircleNumber/circleNumber.module.css b/frontend/app/components/Onboarding/components/CircleNumber/circleNumber.module.css index 09ea8aae2..521bc30ca 100644 --- a/frontend/app/components/Onboarding/components/CircleNumber/circleNumber.module.css +++ b/frontend/app/components/Onboarding/components/CircleNumber/circleNumber.module.css @@ -1,6 +1,6 @@ .number { - width: 24px; - height: 24px; + width: 20px; + height: 20px; background-color: black; display: flex; justify-content: center; @@ -8,6 +8,6 @@ border-radius: 50%; color: white; font-size: 12px; - margin-right: 10px; flex-shrink: 0; + padding-top: .15rem; } \ No newline at end of file diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/AndroidInstallDocs.tsx b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/AndroidInstallDocs.tsx index c554868d5..262dbd1df 100644 --- a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/AndroidInstallDocs.tsx +++ b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/AndroidInstallDocs.tsx @@ -69,13 +69,13 @@ function AndroidInstallDocs({ site, ingestPoint }: any) { .replace('INGEST_POINT', ingestPoint); return ( -
-
-
+
+
+
- Install the SDK + Install the SDK
-
+
@@ -83,83 +83,95 @@ function AndroidInstallDocs({ site, ingestPoint }: any) {
-
- - Add to your app -
-
-
-
-
- +
+
+ + Add to your app +
+
+
+
+
+ +
+
-
-
+
-
- - Configuration -
-
-
-
- -
- By default, all options equals{' '} - - true - +
+
+ + Configuration +
+
+
+
+ +
+ By default, all options equals{' '} + + true + +
-
- - Set up touch events listener -
-
-
-
-
- +
+
+ + Set up touch events listener +
+
+
+
+
+ +
+
-
-
- - Hide sensitive views -
-
-
-
-
- + +
+
+ + Hide sensitive views +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+ + Track inputs +
+
+
+
+
+ +
+
-
-
- - Track inputs -
-
-
-
-
- -
- -
-
-
); } diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js index b30498a82..94cbd155e 100644 --- a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js +++ b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js @@ -33,26 +33,27 @@ function InstallDocs({ site }) { const _usageCodeSST = usageCodeSST.replace('PROJECT_KEY', site.projectKey); const [isSpa, setIsSpa] = useState(true); return ( -
-
-
+
+
+
- Install the npm package. + Install the npm package.
-
+
-
-
+ +
+
- Continue with one of the following options. + Continue with one of the following options.
-
+
setIsSpa(!isSpa)}> Server-Side-Rendered (SSR)?
@@ -63,8 +64,9 @@ function InstallDocs({ site }) { // style={{ lineHeight: '23px' }} />
+ -
+
{isSpa && (
@@ -102,14 +104,14 @@ function InstallDocs({ site }) {
-
+
- Enable Assist (Optional) + Enable Assist (Optional)
-
+
-
+
Install the plugin via npm:
@@ -120,7 +122,7 @@ function InstallDocs({ site }) {
-
+
Then enable it with your tracker:
diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx index db1526cf6..4acff6648 100644 --- a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx +++ b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/MobileInstallDocs.tsx @@ -75,13 +75,13 @@ function MobileInstallDocs({ site, ingestPoint }: any) { const _usageCode = usageCode.replace('INGEST_POINT', ingestPoint).replace('PROJECT_KEY', site.projectKey); return ( -
-
-
+
+
+
- Install the Swift Package + Install the Swift Package
-
+
@@ -89,78 +89,91 @@ function MobileInstallDocs({ site, ingestPoint }: any) {
-
- - Add to your app -
-
-
-
-
- +
+
+ + Add to your app +
+
+
+
+
+ +
+
-
-
- - Configuration -
-
-
-
- -
By default, all options equals true
+
+
+ + Configuration +
+
+
+
+ +
By default, all options equals true
+
-
- - Set up touch events listener -
-
-
-
-
- + + +
+
+ + Set up touch events listener +
+
+
+
+
+ +
+
-
-
- - Hide sensitive views -
-
-
-
-
- +
+
+ + Hide sensitive views +
+
+
+
+
+ +
+
-
-
- - Track inputs -
-
-
-
-
- +
+
+ + Track inputs +
+
+
+
+
+ +
+
-
+
); } diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/projectCodeSnippet.module.css b/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/projectCodeSnippet.module.css index 610a3a4d7..4a2bcacae 100644 --- a/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/projectCodeSnippet.module.css +++ b/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/projectCodeSnippet.module.css @@ -84,7 +84,6 @@ .info { padding: 5px 10px; - background-color: #ffedd1; } .number { diff --git a/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/projectCodeSnippet.module.css b/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/projectCodeSnippet.module.css index 659b706fe..dc2a3a39b 100644 --- a/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/projectCodeSnippet.module.css +++ b/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/projectCodeSnippet.module.css @@ -84,5 +84,4 @@ .info { padding: 5px 10px; - background-color: #ffedd1; } \ No newline at end of file diff --git a/frontend/app/components/ui/CodeBlock/CodeBlock.tsx b/frontend/app/components/ui/CodeBlock/CodeBlock.tsx index fff236d8b..d7a5fad47 100644 --- a/frontend/app/components/ui/CodeBlock/CodeBlock.tsx +++ b/frontend/app/components/ui/CodeBlock/CodeBlock.tsx @@ -10,7 +10,7 @@ export default function CodeBlock({ code, language = 'javascript' }) { }, [code, language]); return ( -
+    
       
         {code}
       
diff --git a/frontend/app/components/ui/CopyButton/CopyButton.js b/frontend/app/components/ui/CopyButton/CopyButton.js
index 607e6272f..bceb38b31 100644
--- a/frontend/app/components/ui/CopyButton/CopyButton.js
+++ b/frontend/app/components/ui/CopyButton/CopyButton.js
@@ -1,7 +1,7 @@
 import React from 'react'
 import { useState } from 'react';
 import copy from 'copy-to-clipboard';
-import { Button } from 'UI';
+import { Button } from 'antd';
 
 function CopyButton({ content, variant="text-primary",  className = '', btnText = 'copy' }) {
   const [copied, setCopied] = useState(false)
@@ -16,9 +16,10 @@ function CopyButton({ content, variant="text-primary",  className = '', btnText
   
   return (
     
diff --git a/frontend/app/styles/general.css b/frontend/app/styles/general.css
index 4e0465da9..4278fdaae 100644
--- a/frontend/app/styles/general.css
+++ b/frontend/app/styles/general.css
@@ -414,6 +414,17 @@ p {
   background-color: #E6E9FA;
 }
 
+.pref-projects-menu .ant-menu-light .ant-menu-item-selected{
+  background-color: #F6F7FF;
+  color: rgba(0,0,0,.7);
+  font-weight: 500;
+}
+
+.pref-projects-menu .ant-menu-light .ant-menu-item{
+  margin-bottom: .5rem;
+  border-radius: .75rem;
+}
+
 .dashboardDataPeriodSelector .dashboardMoreOptionsLabel{
   display: none;
 }