Skip to content

Commit

Permalink
Restyled the Side navigation in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
olgenn committed Aug 19, 2024
1 parent 27abb5b commit 5dd9f2c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
15 changes: 9 additions & 6 deletions frontend/src/layouts/AppLayout/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,23 @@ export const useSideNavigation = () => {

const navLinks: SideNavigationProps['items'] = [
projectsDropdownList.length && {
type: 'section',
text: t('navigation.project'),
type: 'section-group',
title: t('navigation.project'),
items: projectLinks,
},
projectsDropdownList.length && { type: 'divider' },

isAvailableAdministrationLinks && {
type: 'section',
text: t('navigation.administration'),
type: 'section-group',
title: t('navigation.administration'),
items: administrationLinks,
},

isAvailableAdministrationLinks && { type: 'divider' },

{
type: 'section',
text: t('navigation.account'),
type: 'section-group',
title: t('navigation.account'),
items: userSettingsLinks,
},
].filter(Boolean) as SideNavigationProps['items'];
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/layouts/AppLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,14 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
splitPanelOpen
breadcrumbs={renderBreadcrumbs()}
notifications={<Notifications />}
navigation={<SideNavigation activeHref={activeHref} items={navLinks} onFollow={onFollowHandler} />}
navigation={
<SideNavigation
header={{ href: '#', text: t('common.control_plane') }}
activeHref={activeHref}
items={navLinks}
onFollow={onFollowHandler}
/>
}
tools={
<>
<Tabs
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"tutorial_other": "Tour",
"docs": "Docs",
"discord": "Discord",
"danger_zone": "Danger Zone"
"danger_zone": "Danger Zone",
"control_plane": "Control plane"
},

"auth": {
Expand Down

0 comments on commit 5dd9f2c

Please sign in to comment.