mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
feat: open unleash concepts (#8301)
This commit is contained in:
parent
a4ea46dab6
commit
6f7170dc40
@ -31,17 +31,12 @@ import { RoleAndOwnerInfo } from './RoleAndOwnerInfo';
|
|||||||
import { ContentGridNoProjects } from './ContentGridNoProjects';
|
import { ContentGridNoProjects } from './ContentGridNoProjects';
|
||||||
import { LatestProjectEvents } from './LatestProjectEvents';
|
import { LatestProjectEvents } from './LatestProjectEvents';
|
||||||
import { usePersonalDashboardProjectDetails } from 'hooks/api/getters/usePersonalDashboard/usePersonalDashboardProjectDetails';
|
import { usePersonalDashboardProjectDetails } from 'hooks/api/getters/usePersonalDashboard/usePersonalDashboardProjectDetails';
|
||||||
|
import HelpOutline from '@mui/icons-material/HelpOutline';
|
||||||
|
|
||||||
const ScreenExplanation = styled(Typography)(({ theme }) => ({
|
const ScreenExplanation = styled('div')(({ theme }) => ({
|
||||||
marginTop: theme.spacing(1),
|
marginBottom: theme.spacing(4),
|
||||||
marginBottom: theme.spacing(8),
|
display: 'flex',
|
||||||
maxWidth: theme.spacing(45),
|
alignItems: 'center',
|
||||||
}));
|
|
||||||
|
|
||||||
const StyledHeaderTitle = styled(Typography)(({ theme }) => ({
|
|
||||||
fontSize: theme.typography.h2.fontSize,
|
|
||||||
fontWeight: 'normal',
|
|
||||||
marginBottom: theme.spacing(2),
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const ContentGrid = styled(Grid)(({ theme }) => ({
|
const ContentGrid = styled(Grid)(({ theme }) => ({
|
||||||
@ -196,8 +191,8 @@ export const PersonalDashboard = () => {
|
|||||||
const stage = activeProjectOverview?.onboardingStatus.status ?? 'loading';
|
const stage = activeProjectOverview?.onboardingStatus.status ?? 'loading';
|
||||||
|
|
||||||
const [welcomeDialog, setWelcomeDialog] = useLocalStorageState<
|
const [welcomeDialog, setWelcomeDialog] = useLocalStorageState<
|
||||||
'seen' | 'not_seen'
|
'open' | 'closed'
|
||||||
>('welcome-dialog:v1', 'not_seen');
|
>('welcome-dialog:v1', 'open');
|
||||||
|
|
||||||
const noProjects = projects.length === 0;
|
const noProjects = projects.length === 0;
|
||||||
|
|
||||||
@ -207,10 +202,19 @@ export const PersonalDashboard = () => {
|
|||||||
Welcome {name}
|
Welcome {name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<ScreenExplanation>
|
<ScreenExplanation>
|
||||||
Here are some tasks we think would be useful in order to get the
|
<p>
|
||||||
most of Unleash
|
Here are some tasks we think would be useful in order to get
|
||||||
|
the most out of Unleash
|
||||||
|
</p>
|
||||||
|
<IconButton
|
||||||
|
size={'small'}
|
||||||
|
title='Key concepts'
|
||||||
|
onClick={() => setWelcomeDialog('open')}
|
||||||
|
>
|
||||||
|
<HelpOutline />
|
||||||
|
</IconButton>
|
||||||
</ScreenExplanation>
|
</ScreenExplanation>
|
||||||
<StyledHeaderTitle>Your resources</StyledHeaderTitle>
|
|
||||||
{noProjects ? (
|
{noProjects ? (
|
||||||
<ContentGridNoProjects
|
<ContentGridNoProjects
|
||||||
owners={[{ ownerType: 'system' }]}
|
owners={[{ ownerType: 'system' }]}
|
||||||
@ -366,8 +370,8 @@ export const PersonalDashboard = () => {
|
|||||||
</SpacedGridItem>
|
</SpacedGridItem>
|
||||||
</ContentGrid>
|
</ContentGrid>
|
||||||
<WelcomeDialog
|
<WelcomeDialog
|
||||||
open={welcomeDialog !== 'seen'}
|
open={welcomeDialog === 'open'}
|
||||||
onClose={() => setWelcomeDialog('seen')}
|
onClose={() => setWelcomeDialog('closed')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user