1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

chore: re-order project settings menu (#8626)

This PR re-orders the project settings menu according to the new design.
It also renames pages as specified. It does *not* add the new
"applications and sdks" link because we don't have that page yet.

I have not put this change behind a flag, because it's not a new feature
and doesn't really change the user experience. However, I'd be happy to
flag it if you think that's better.


![image](https://github.com/user-attachments/assets/42dc3348-e873-49b2-9bd7-8c3b3f4a2532)


The header for the user access tab has also been updated:

![image](https://github.com/user-attachments/assets/7c61da17-2b28-4f39-a9d4-83d9ec1903cd)
This commit is contained in:
Thomas Heartman 2024-11-01 10:29:25 +01:00 committed by GitHub
parent dc1847420c
commit bbe389d19e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 32 deletions

View File

@ -35,44 +35,45 @@ export const ProjectSettings = () => {
const actionsEnabled = useUiFlag('automatedActions'); const actionsEnabled = useUiFlag('automatedActions');
const paidTabs = (...tabs: ITab[]) =>
isPro() || isEnterprise() ? tabs : [];
const tabs: ITab[] = [ const tabs: ITab[] = [
...(isPro() || isEnterprise() ...paidTabs(
? [ {
{ id: '',
id: '', label: 'Project settings',
label: 'Settings', },
}, {
{ id: 'access',
id: 'access', label: 'User access',
label: 'Access', },
}, ),
{ {
id: 'segments', id: 'api-access',
label: 'Segments', label: 'API access',
}, },
{ ...paidTabs({
id: 'change-requests', id: 'segments',
label: 'Change request configuration', label: 'Segments',
icon: isPro() ? ( }),
<StyledBadgeContainer>
<EnterpriseBadge />
</StyledBadgeContainer>
) : undefined,
},
]
: []),
{ {
id: 'environments', id: 'environments',
label: 'Environments', label: 'Environments',
}, },
{
id: 'api-access',
label: 'API access',
},
{ {
id: 'default-strategy', id: 'default-strategy',
label: 'Default strategy', label: 'Default strategy',
}, },
...paidTabs({
id: 'change-requests',
label: 'Change request configuration',
icon: isPro() ? (
<StyledBadgeContainer>
<EnterpriseBadge />
</StyledBadgeContainer>
) : undefined,
}),
]; ];
if (actionsEnabled) { if (actionsEnabled) {

View File

@ -24,7 +24,7 @@ export const ProjectAccess = () => {
if (isOss()) { if (isOss()) {
return ( return (
<PageContent <PageContent
header={<PageHeader title='Access' />} header={<PageHeader title='User access' />}
sx={{ justifyContent: 'center' }} sx={{ justifyContent: 'center' }}
> >
<PremiumFeature feature='access' /> <PremiumFeature feature='access' />
@ -34,7 +34,7 @@ export const ProjectAccess = () => {
if (!hasAccess([UPDATE_PROJECT, PROJECT_USER_ACCESS_READ], projectId)) { if (!hasAccess([UPDATE_PROJECT, PROJECT_USER_ACCESS_READ], projectId)) {
return ( return (
<PageContent header={<PageHeader title='Access' />}> <PageContent header={<PageHeader title='User access' />}>
<Alert severity='error'> <Alert severity='error'>
You need project owner permissions to access this section. You need project owner permissions to access this section.
</Alert> </Alert>

View File

@ -402,7 +402,7 @@ export const ProjectAccessTable: VFC = () => {
header={ header={
<PageHeader <PageHeader
secondary secondary
title={`Access (${ title={`User access (${
rows.length < data.length rows.length < data.length
? `${rows.length} of ${data.length}` ? `${rows.length} of ${data.length}`
: data.length : data.length