ui: fixes for onboarding ui
This commit is contained in:
parent
de344e62ef
commit
c77b0cc4de
7 changed files with 48 additions and 51 deletions
|
|
@ -8,6 +8,7 @@ import MobileOnboardingTabs from '../OnboardingTabs/OnboardingMobileTabs';
|
|||
import ProjectFormButton from '../ProjectFormButton';
|
||||
import withOnboarding, { WithOnboardingProps } from '../withOnboarding';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { CircleHelp } from 'lucide-react'
|
||||
|
||||
interface Props extends WithOnboardingProps {
|
||||
platforms: Array<{
|
||||
|
|
@ -45,8 +46,8 @@ function InstallOpenReplayTab(props: Props) {
|
|||
</div>
|
||||
<a href={"https://docs.openreplay.com/en/sdk/using-or/"} target="_blank">
|
||||
<Button size={"small"} type={"text"} className="ml-2 flex items-center gap-2">
|
||||
<Icon name={"question-circle"} />
|
||||
<div className={"text-main"}>{t('See Documentation')}</div>
|
||||
<CircleHelp size={14} />
|
||||
<div>{t('See Documentation')}</div>
|
||||
</Button>
|
||||
</a>
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
import React from 'react'
|
||||
import DocCard from "App/components/shared/DocCard";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Mail } from 'lucide-react'
|
||||
import { CopyButton } from "UI";
|
||||
|
||||
export function CollabCard({ showUserModal }: { showUserModal: () => void }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<DocCard title={t('Need help from team member?')}>
|
||||
<div className={'text-main cursor-pointer flex items-center gap-2'} onClick={showUserModal}>
|
||||
<Mail size={14} />
|
||||
<span>
|
||||
{t('Invite and Collaborate')}
|
||||
</span>
|
||||
</div>
|
||||
</DocCard>
|
||||
)
|
||||
}
|
||||
|
||||
export function ProjectKeyCard({ projectKey }: { projectKey: string }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<DocCard title={t('Project Key')}>
|
||||
<div className="p-2 rounded bg-white flex justify-between items-center">
|
||||
<div className={'font-mono'}>{projectKey}</div>
|
||||
<CopyButton content={projectKey} className={'capitalize font-medium text-neutral-400'} />
|
||||
</div>
|
||||
</DocCard>
|
||||
)
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import DocCard from 'Shared/DocCard/DocCard';
|
|||
import { useModal } from 'App/components/Modal';
|
||||
import UserForm from 'App/components/Client/Users/components/UserForm/UserForm';
|
||||
import AndroidInstallDocs from 'Components/Onboarding/components/OnboardingTabs/InstallDocs/AndroidInstallDocs';
|
||||
import { CollabCard, ProjectKeyCard } from "./Callouts";
|
||||
import MobileInstallDocs from './InstallDocs/MobileInstallDocs';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
|
@ -39,18 +40,9 @@ function MobileTrackingCodeModal(props: Props) {
|
|||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<DocCard title={t('Need help from team member?')}>
|
||||
<a className="link" onClick={showUserModal}>
|
||||
{t('Invite and Collaborate')}
|
||||
</a>
|
||||
</DocCard>
|
||||
<CollabCard showUserModal={showUserModal} />
|
||||
|
||||
<DocCard title={t('Project Key')}>
|
||||
<div className="p-2 rounded bg-white flex justify-between items-center">
|
||||
{site.projectKey}
|
||||
<CopyButton content={site.projectKey} />
|
||||
</div>
|
||||
</DocCard>
|
||||
<ProjectKeyCard projectKey={site.projectKey} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -62,18 +54,9 @@ function MobileTrackingCodeModal(props: Props) {
|
|||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<DocCard title={t('Need help from team member?')}>
|
||||
<a className="link" onClick={showUserModal}>
|
||||
{t('Invite and Collaborate')}
|
||||
</a>
|
||||
</DocCard>
|
||||
<CollabCard showUserModal={showUserModal} />
|
||||
|
||||
<DocCard title={t('Project Key')}>
|
||||
<div className="p-2 rounded bg-white flex justify-between items-center">
|
||||
{site.projectKey}
|
||||
<CopyButton content={site.projectKey} />
|
||||
</div>
|
||||
</DocCard>
|
||||
<ProjectKeyCard projectKey={site.projectKey} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Tabs, Icon, CopyButton } from 'UI';
|
|||
import DocCard from 'Shared/DocCard/DocCard';
|
||||
import { useModal } from 'App/components/Modal';
|
||||
import UserForm from 'App/components/Client/Users/components/UserForm/UserForm';
|
||||
import { CollabCard, ProjectKeyCard } from "./Callouts";
|
||||
import InstallDocs from './InstallDocs';
|
||||
import ProjectCodeSnippet from './ProjectCodeSnippet';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
|
@ -37,20 +38,9 @@ function TrackingCodeModal(props: Props) {
|
|||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<DocCard title="Need help from team member?">
|
||||
<a className="link" onClick={showUserModal}>
|
||||
{t('Invite and Collaborate')}
|
||||
</a>
|
||||
</DocCard>
|
||||
<DocCard title="Project Key">
|
||||
<div className="rounded bg-white px-2 py-1 flex items-center justify-between">
|
||||
<span>{site.projectKey}</span>
|
||||
<CopyButton
|
||||
content={site.projectKey}
|
||||
className="capitalize"
|
||||
/>
|
||||
</div>
|
||||
</DocCard>
|
||||
<CollabCard showUserModal={showUserModal} />
|
||||
|
||||
<ProjectKeyCard projectKey={site.projectKey} />
|
||||
<DocCard title="Other ways to install">
|
||||
<a
|
||||
className="link flex items-center"
|
||||
|
|
@ -77,18 +67,9 @@ function TrackingCodeModal(props: Props) {
|
|||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<DocCard title="Need help from team member?">
|
||||
<a className="link" onClick={showUserModal}>
|
||||
{t('Invite and Collaborate')}
|
||||
</a>
|
||||
</DocCard>
|
||||
<CollabCard showUserModal={showUserModal} />
|
||||
|
||||
<DocCard title="Project Key">
|
||||
<div className="p-2 rounded bg-white flex justify-between items-center">
|
||||
{site.projectKey}
|
||||
<CopyButton content={site.projectKey} />
|
||||
</div>
|
||||
</DocCard>
|
||||
<ProjectKeyCard projectKey={site.projectKey} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ function SideMenu(props: Props) {
|
|||
<Menu
|
||||
mode="inline"
|
||||
onClick={handleClick}
|
||||
style={{ marginTop: '8px', border: 'none' }}
|
||||
style={{ border: 'none' }}
|
||||
selectedKeys={activeTab ? [activeTab] : []}
|
||||
>
|
||||
<Menu.Item
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function DocCard(props: Props) {
|
|||
} = props;
|
||||
|
||||
return (
|
||||
<div className={cn('p-5 bg-gray-lightest mb-4 rounded', className)}>
|
||||
<div className={cn('p-5 bg-gray-lightest mb-4 rounded-lg', className)}>
|
||||
<div className="font-medium mb-2 flex items-center">
|
||||
{props.icon && (
|
||||
<div
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Reference in a new issue