diff --git a/inertia/components/dashboard/dashboard_header.tsx b/inertia/components/dashboard/dashboard_header.tsx index dfae1d7..70d9971 100644 --- a/inertia/components/dashboard/dashboard_header.tsx +++ b/inertia/components/dashboard/dashboard_header.tsx @@ -1,6 +1,16 @@ +import { Visibility } from '#enums/visibility'; import { Link } from '@inertiajs/react'; import { route } from '@izzyjs/route/client'; -import { ActionIcon, AppShell, Burger, Group, Menu, Text } from '@mantine/core'; +import { + ActionIcon, + AppShell, + Badge, + Burger, + Flex, + Group, + Menu, + Text, +} from '@mantine/core'; import { useTranslation } from 'react-i18next'; import { BsThreeDotsVertical } from 'react-icons/bs'; import { GoPencil } from 'react-icons/go'; @@ -32,7 +42,19 @@ export function DashboardHeader({ navbar, aside }: DashboardHeaderProps) { hiddenFrom="sm" size="sm" /> - {activeCollection?.name} + + + {activeCollection?.name}{' '} + {activeCollection?.visibility === Visibility.PUBLIC && ( + {t('visibility.public')} + )} + + {activeCollection?.description && ( + + {activeCollection.description} + + )} + diff --git a/inertia/pages/dashboard.tsx b/inertia/pages/dashboard.tsx index 7282688..be945b7 100644 --- a/inertia/pages/dashboard.tsx +++ b/inertia/pages/dashboard.tsx @@ -26,6 +26,9 @@ interface DashboardPageProps { activeCollection: CollectionWithLinks; } +const HEADER_SIZE_WITH_DESCRIPTION = 60; +const HEADER_SIZE_WITHOUT_DESCRIPTION = 50; + export default function MantineDashboard(props: Readonly) { const [openedNavbar, { toggle: toggleNavbar, close: closeNavbar }] = useDisclosure(); @@ -71,7 +74,11 @@ export default function MantineDashboard(props: Readonly) {