diff --git a/src/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx index c47287dd4..9a413ba5d 100644 --- a/src/components/AppShelf/AddAppShelfItem.tsx +++ b/src/components/AppShelf/AddAppShelfItem.tsx @@ -10,6 +10,8 @@ import { Text, Card, LoadingOverlay, + ActionIcon, + Tooltip, } from '@mantine/core'; import { useForm } from '@mantine/form'; import { motion } from 'framer-motion'; @@ -19,6 +21,35 @@ import { useConfig } from '../../tools/state'; import { ServiceTypeList } from '../../tools/types'; import { AppShelfItemWrapper } from './AppShelfItemWrapper'; +export function AddItemShelfButton(props: any) { + const [opened, setOpened] = useState(false); + return ( + <> + setOpened(false)} + title="Add a service" + > + + + setOpened(true)} + > + + + + + + ); +} + export default function AddItemShelfItem(props: any) { const [opened, setOpened] = useState(false); return ( diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx index 8727905c4..0324458e5 100644 --- a/src/components/layout/Footer.tsx +++ b/src/components/layout/Footer.tsx @@ -72,7 +72,7 @@ export function Footer({ links }: FooterCenteredProps) { }} > Made with ❤️ by @ - + ajnart diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index b8eb2a9ab..44185e28e 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -1,18 +1,11 @@ -import React, { useState } from 'react'; -import { - createStyles, - Header as Head, - Container, - Group, - Burger, - Drawer, - Center, -} from '@mantine/core'; +import React from 'react'; +import { createStyles, Header as Head, Group, Drawer, Center } from '@mantine/core'; import { useBooleanToggle } from '@mantine/hooks'; import { NextLink } from '@mantine/next'; import { Logo } from './Logo'; -import { SettingsMenuButton } from '../Settings/SettingsMenu'; import CalendarComponent from '../modules/calendar/CalendarModule'; +import { SettingsMenuButton } from '../Settings/SettingsMenu'; +import { AddItemShelfButton } from '../AppShelf/AddAppShelfItem'; const HEADER_HEIGHT = 60; @@ -40,8 +33,6 @@ const useStyles = createStyles((theme) => ({ header: { display: 'flex', - justifyContent: 'space-between', - alignItems: 'center', height: '100%', }, @@ -94,62 +85,33 @@ interface HeaderResponsiveProps { export function Header({ links }: HeaderResponsiveProps) { const [opened, toggleOpened] = useBooleanToggle(false); - const [active, setActive] = useState('/'); const { classes, cx } = useStyles(); - const items = ( - <> - {links.map((link) => ( - { - setActive(link.link); - toggleOpened(false); - }} - > - {link.label} - - ))} - - ); return ( - - - - - - - - - {items} - + + + + + - - toggleOpened()} - className={classes.burger} - size="sm" - /> + + - toggleOpened()} - position="right" - > - {opened ?? ( -
- -
- )} -
-
+ toggleOpened()} + position="right" + > + {opened ?? ( +
+ +
+ )} +
); } diff --git a/src/components/layout/Logo.tsx b/src/components/layout/Logo.tsx index 824688a1b..f85bca9e1 100644 --- a/src/components/layout/Logo.tsx +++ b/src/components/layout/Logo.tsx @@ -1,15 +1,29 @@ -import { Text } from '@mantine/core'; +import { Group, Text } from '@mantine/core'; import * as React from 'react'; +import { CURRENT_VERSION } from '../../../data/constants'; export function Logo({ style }: any) { return ( - - Homarr - + + + Homarr + + + {CURRENT_VERSION} + + ); }