2022-06-06 15:20:46 +02:00
|
|
|
import {
|
2022-06-27 17:27:59 +02:00
|
|
|
ActionIcon,
|
2022-06-06 15:20:46 +02:00
|
|
|
Box,
|
|
|
|
|
Burger,
|
2022-06-27 17:27:59 +02:00
|
|
|
createStyles,
|
2022-06-06 15:20:46 +02:00
|
|
|
Drawer,
|
2022-06-27 17:27:59 +02:00
|
|
|
Group,
|
|
|
|
|
Header as Head,
|
2022-06-06 15:20:46 +02:00
|
|
|
ScrollArea,
|
2022-06-27 17:27:59 +02:00
|
|
|
Title,
|
2022-06-06 15:20:46 +02:00
|
|
|
Transition,
|
|
|
|
|
} from '@mantine/core';
|
|
|
|
|
import { useBooleanToggle } from '@mantine/hooks';
|
2022-05-16 15:56:16 +02:00
|
|
|
import { AddItemShelfButton } from '../AppShelf/AddAppShelfItem';
|
2022-07-20 15:15:07 +02:00
|
|
|
import {
|
|
|
|
|
CalendarModule,
|
|
|
|
|
DateModule,
|
|
|
|
|
TotalDownloadsModule,
|
|
|
|
|
WeatherModule,
|
|
|
|
|
DashdotModule,
|
|
|
|
|
} from '../modules';
|
2022-07-21 11:43:43 +02:00
|
|
|
import DockerMenuButton from '../modules/docker/DockerModule';
|
2022-06-06 15:20:46 +02:00
|
|
|
import { ModuleWrapper } from '../modules/moduleWrapper';
|
2022-06-27 17:27:59 +02:00
|
|
|
import SearchBar from '../modules/search/SearchModule';
|
|
|
|
|
import { SettingsMenuButton } from '../Settings/SettingsMenu';
|
|
|
|
|
import { Logo } from './Logo';
|
2022-04-25 00:11:32 +02:00
|
|
|
|
|
|
|
|
const HEADER_HEIGHT = 60;
|
|
|
|
|
|
|
|
|
|
const useStyles = createStyles((theme) => ({
|
2022-05-16 15:56:16 +02:00
|
|
|
hide: {
|
2022-05-16 14:34:01 +02:00
|
|
|
[theme.fn.smallerThan('xs')]: {
|
2022-04-25 00:11:32 +02:00
|
|
|
display: 'none',
|
|
|
|
|
},
|
|
|
|
|
},
|
2022-06-06 15:20:46 +02:00
|
|
|
burger: {
|
|
|
|
|
[theme.fn.largerThan('sm')]: {
|
|
|
|
|
display: 'none',
|
|
|
|
|
},
|
|
|
|
|
},
|
2022-04-25 00:11:32 +02:00
|
|
|
}));
|
|
|
|
|
|
2022-05-16 13:54:08 +02:00
|
|
|
export function Header(props: any) {
|
2022-06-06 15:20:46 +02:00
|
|
|
const [opened, toggleOpened] = useBooleanToggle(false);
|
2022-04-25 00:11:32 +02:00
|
|
|
const { classes, cx } = useStyles();
|
2022-06-06 15:20:46 +02:00
|
|
|
const [hidden, toggleHidden] = useBooleanToggle(true);
|
2022-04-25 00:11:32 +02:00
|
|
|
|
|
|
|
|
return (
|
2022-05-16 15:56:16 +02:00
|
|
|
<Head height="auto">
|
2022-06-07 17:36:05 +00:00
|
|
|
<Group p="xs" position="apart">
|
2022-05-16 15:56:16 +02:00
|
|
|
<Box className={classes.hide}>
|
|
|
|
|
<Logo style={{ fontSize: 22 }} />
|
|
|
|
|
</Box>
|
|
|
|
|
<Group noWrap>
|
2022-05-16 13:54:08 +02:00
|
|
|
<SearchBar />
|
2022-07-21 11:43:43 +02:00
|
|
|
<DockerMenuButton />
|
2022-05-04 07:12:22 +02:00
|
|
|
<SettingsMenuButton />
|
2022-05-14 21:41:30 +02:00
|
|
|
<AddItemShelfButton />
|
2022-05-04 07:12:22 +02:00
|
|
|
</Group>
|
2022-05-14 21:41:30 +02:00
|
|
|
</Group>
|
2022-04-25 00:11:32 +02:00
|
|
|
</Head>
|
|
|
|
|
);
|
|
|
|
|
}
|