From 6d16fc60ce6a4b53cdcb69077b2ffe1328e2ef08 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Mon, 30 Sep 2024 16:09:31 +0200 Subject: [PATCH] feat: Personal dashboard flag created (#8305) --- .../personalDashboard/ConnectSDK.tsx | 42 ++++++++++++++++++- .../personalDashboard/PersonalDashboard.tsx | 8 +++- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/frontend/src/component/personalDashboard/ConnectSDK.tsx b/frontend/src/component/personalDashboard/ConnectSDK.tsx index 9d91ae15da..497c7c8a14 100644 --- a/frontend/src/component/personalDashboard/ConnectSDK.tsx +++ b/frontend/src/component/personalDashboard/ConnectSDK.tsx @@ -1,4 +1,4 @@ -import { Button, styled } from '@mui/material'; +import { Button, styled, Typography } from '@mui/material'; import type { FC } from 'react'; const TitleContainer = styled('div')(({ theme }) => ({ @@ -20,6 +20,22 @@ const NeutralCircleContainer = styled('span')(({ theme }) => ({ borderRadius: '50%', })); +const MainCircleContainer = styled(NeutralCircleContainer)(({ theme }) => ({ + backgroundColor: theme.palette.primary.main, + color: theme.palette.background.paper, +})); + +const SuccessContainer = styled('div')(({ theme }) => ({ + display: 'flex', + flexDirection: 'column', + + fontSize: theme.spacing(1.75), + fontWeight: 'bold', + backgroundColor: theme.palette.success.light, + borderRadius: theme.shape.borderRadiusLarge, + padding: theme.spacing(2, 2, 2, 2), +})); + const ActionBox = styled('div')(({ theme }) => ({ flexBasis: '50%', padding: theme.spacing(4, 2), @@ -48,6 +64,30 @@ export const CreateFlag: FC<{ project: string }> = ({ project }) => { ); }; +export const ExistingFlag: FC<{ project: string }> = ({ project }) => { + return ( + + + + Create a feature flag + + + + You have created your first flag + + + Go to the project to customize the flag further. + + +
+ +
+
+ ); +}; + export const ConnectSDK: FC<{ project: string }> = ({ project }) => { return ( diff --git a/frontend/src/component/personalDashboard/PersonalDashboard.tsx b/frontend/src/component/personalDashboard/PersonalDashboard.tsx index 3fdde6e8d7..4007468415 100644 --- a/frontend/src/component/personalDashboard/PersonalDashboard.tsx +++ b/frontend/src/component/personalDashboard/PersonalDashboard.tsx @@ -15,7 +15,7 @@ import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon'; import React, { type FC, useEffect, useState } from 'react'; import LinkIcon from '@mui/icons-material/Link'; import { Badge } from '../common/Badge/Badge'; -import { ConnectSDK, CreateFlag } from './ConnectSDK'; +import { ConnectSDK, CreateFlag, ExistingFlag } from './ConnectSDK'; import { WelcomeDialog } from './WelcomeDialog'; import { useLocalStorageState } from 'hooks/useLocalStorageState'; import { ProjectSetupComplete } from './ProjectSetupComplete'; @@ -298,9 +298,13 @@ export const PersonalDashboard = () => { {stage === 'onboarded' ? ( - ) : activeProject ? ( + ) : null} + {stage === 'onboarding-started' ? ( ) : null} + {stage === 'first-flag-created' ? ( + + ) : null} {stage === 'onboarded' &&