diff --git a/src/app/(main)/SideNav.tsx b/src/app/(main)/SideNav.tsx index 92172be98..ba2893bb9 100644 --- a/src/app/(main)/SideNav.tsx +++ b/src/app/(main)/SideNav.tsx @@ -10,6 +10,7 @@ import { TooltipTrigger, } from '@umami/react-zen'; import Link from 'next/link'; +import { SettingsNav } from '@/app/(main)/settings/SettingsNav'; import { WebsiteNav } from '@/app/(main)/websites/[websiteId]/WebsiteNav'; import { IconLabel } from '@/components/common/IconLabel'; import { useGlobalState, useMessages, useNavigation } from '@/components/hooks'; @@ -83,6 +84,8 @@ export function SideNav(props: any) { {websiteId ? ( + ) : pathname.includes('/settings') ? ( + ) : ( {links.map(({ id, path, label, icon }) => { diff --git a/src/app/(main)/settings/SettingsLayout.tsx b/src/app/(main)/settings/SettingsLayout.tsx index 9e89b19eb..1003b61ae 100644 --- a/src/app/(main)/settings/SettingsLayout.tsx +++ b/src/app/(main)/settings/SettingsLayout.tsx @@ -1,25 +1,12 @@ 'use client'; -import { Column, Grid } from '@umami/react-zen'; +import { Column } from '@umami/react-zen'; import type { ReactNode } from 'react'; import { PageBody } from '@/components/common/PageBody'; -import { SettingsNav } from './SettingsNav'; export function SettingsLayout({ children }: { children: ReactNode }) { return ( - - - - - - {children} - - + + {children} + ); } diff --git a/src/app/(main)/settings/SettingsNav.tsx b/src/app/(main)/settings/SettingsNav.tsx index bfe8a0aee..113978381 100644 --- a/src/app/(main)/settings/SettingsNav.tsx +++ b/src/app/(main)/settings/SettingsNav.tsx @@ -1,8 +1,16 @@ -import { NavMenu } from '@/components/common/NavMenu'; +import { Column, Focusable, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; +import Link from 'next/link'; +import { IconLabel } from '@/components/common/IconLabel'; import { useMessages, useNavigation } from '@/components/hooks'; -import { Settings2, UserCircle, Users } from '@/components/icons'; +import { ArrowLeft, Settings2, UserCircle, Users } from '@/components/icons'; -export function SettingsNav({ onItemClick }: { onItemClick?: () => void }) { +export function SettingsNav({ + isCollapsed, + onItemClick, +}: { + isCollapsed?: boolean; + onItemClick?: () => void; +}) { const { t, labels } = useMessages(); const { renderUrl, pathname } = useNavigation(); @@ -42,12 +50,57 @@ export function SettingsNav({ onItemClick }: { onItemClick?: () => void }) { .find(({ path }) => path && pathname.includes(path.split('?')[0]))?.id; return ( - + + + + + + } label={isCollapsed ? '' : t(labels.back)} padding /> + + + {t(labels.back)} + + + {items.map(({ label: sectionLabel, items: sectionItems }, index) => ( + + {!isCollapsed && ( + + {sectionLabel} + + )} + {sectionItems.map(({ id, path, label, icon }) => { + const isSelected = selectedKey === id; + return ( + + + + + + + + {label} + + + ); + })} + + ))} + ); } diff --git a/src/components/input/TeamsButton.tsx b/src/components/input/TeamsButton.tsx index c9e27d5fe..527ab1fa9 100644 --- a/src/components/input/TeamsButton.tsx +++ b/src/components/input/TeamsButton.tsx @@ -47,9 +47,16 @@ export function TeamsButton() { return (