From 6613e8e645c8bbeb2190671de8d6524570e6b0e8 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 20 Aug 2024 22:13:29 +0200 Subject: [PATCH] Add home tab and action button --- .../Index/Settings/AdminCenter/HomePanel.tsx | 14 ++++++ .../Index/Settings/AdminCenter/Index.tsx | 49 ++++++++++++++----- 2 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 src/frontend/src/pages/Index/Settings/AdminCenter/HomePanel.tsx diff --git a/src/frontend/src/pages/Index/Settings/AdminCenter/HomePanel.tsx b/src/frontend/src/pages/Index/Settings/AdminCenter/HomePanel.tsx new file mode 100644 index 0000000000..d0fd1d0cf4 --- /dev/null +++ b/src/frontend/src/pages/Index/Settings/AdminCenter/HomePanel.tsx @@ -0,0 +1,14 @@ +import { Trans } from '@lingui/macro'; +import { Divider, Stack, Title } from '@mantine/core'; + +export default function HomePanel() { + return ( + + + <Trans>Home Status Panel</Trans> + + + + + ); +} diff --git a/src/frontend/src/pages/Index/Settings/AdminCenter/Index.tsx b/src/frontend/src/pages/Index/Settings/AdminCenter/Index.tsx index eda07e388a..0e825d6d02 100644 --- a/src/frontend/src/pages/Index/Settings/AdminCenter/Index.tsx +++ b/src/frontend/src/pages/Index/Settings/AdminCenter/Index.tsx @@ -1,6 +1,7 @@ import { Trans, t } from '@lingui/macro'; import { Divider, + Flex, Paper, SimpleGrid, Skeleton, @@ -14,6 +15,7 @@ import { IconDevicesPc, IconExclamationCircle, IconFileUpload, + IconHome, IconList, IconListDetails, IconPackages, @@ -26,6 +28,7 @@ import { } from '@tabler/icons-react'; import { lazy, useMemo } from 'react'; +import { ActionButton } from '../../../../components/buttons/ActionButton'; import PermissionDenied from '../../../../components/errors/PermissionDenied'; import { PlaceholderPill } from '../../../../components/items/Placeholder'; import { PanelGroup, PanelType } from '../../../../components/nav/PanelGroup'; @@ -40,6 +43,8 @@ const ReportTemplatePanel = Loadable( const LabelTemplatePanel = Loadable(lazy(() => import('./LabelTemplatePanel'))); +const HomePanel = Loadable(lazy(() => import('./HomePanel'))); + const UserManagementPanel = Loadable( lazy(() => import('./UserManagementPanel')) ); @@ -93,6 +98,12 @@ export default function AdminCenter() { const adminCenterPanels: PanelType[] = useMemo(() => { return [ + { + name: 'home', + label: t`Home`, + icon: , + content: + }, { name: 'user', label: t`Users`, @@ -191,21 +202,33 @@ export default function AdminCenter() { <Trans>Quick Actions</Trans> - - - - Add a new user - - + + } + color="blue" + size="lg" + radius="sm" + variant="filled" + tooltip={t`Go to Home`} + onClick={() => console.log('Home')} + /> + + + + + Add a new user + + - - - + + + - - - - + + + + + );