-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0efd659
commit a9eaf92
Showing
15 changed files
with
161 additions
and
77 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import logoInvert from '@/assets/images/brand/logo-invert.svg'; | ||
import { HOME_ROUTE } from '@/constants/routes'; | ||
import { HEADER_HEIGHT } from '@/constants/theme'; | ||
import type { HeaderProps as MantineHeaderProps } from '@mantine/core'; | ||
import { Box, Button, Image, Header as MantineHeader, Tooltip } from '@mantine/core'; | ||
import { FC } from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import { useHeaderStyles } from './styles'; | ||
|
||
type PrimaryHeaderProps = Omit<MantineHeaderProps, 'children' | 'height' | 'className'>; | ||
|
||
const PrimaryHeader: FC<PrimaryHeaderProps> = (props) => { | ||
const { classes } = useHeaderStyles(); | ||
const { container, logoContainer, navContainer, imageSty, actionBtn } = classes; | ||
|
||
return ( | ||
<MantineHeader {...props} className={container} height={HEADER_HEIGHT} p={0} withBorder> | ||
<Box className={logoContainer}> | ||
<Link to={HOME_ROUTE}> | ||
<Image className={imageSty} src={logoInvert} height={24} alt="Parseable Logo" /> | ||
</Link> | ||
</Box> | ||
<Box className={navContainer}> | ||
<Box | ||
display={'flex'} | ||
sx={{ | ||
justifyContent: 'flex-end', | ||
alignItems: 'center', | ||
width: '100%', | ||
paddingLeft: '1rem', | ||
}} | ||
pr={'xl'}> | ||
<Tooltip label="Upgrade to production support" position="bottom"> | ||
<Button | ||
variant="outline" | ||
component={'a'} | ||
href="mailto:[email protected]?subject=Production%20Support%20Query" | ||
target="_blank" | ||
className={actionBtn}> | ||
<Image height={30} fit="fill" src={'/AGPLv3_Logo.svg'} /> | ||
</Button> | ||
</Tooltip> | ||
</Box> | ||
</Box> | ||
</MantineHeader> | ||
); | ||
}; | ||
|
||
export default PrimaryHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { HeaderProps as MantineHeaderProps } from '@mantine/core'; | ||
import { FC } from 'react'; | ||
import { Route, Routes } from 'react-router-dom'; | ||
import HeaderLayout from './Layout'; | ||
import { ConfigHeader, LogsHeader, QueryHeader, StatsHeader, UsersManagementHeader } from './SubHeader'; | ||
import { CONFIG_ROUTE, LOGS_ROUTE, QUERY_ROUTE, STATS_ROUTE, USERS_MANAGEMENT_ROUTE } from '@/constants/routes'; | ||
|
||
type SecondaryHeaderProps = Omit<MantineHeaderProps, 'children' | 'height' | 'className'>; | ||
|
||
const SecondaryHeader: FC<SecondaryHeaderProps> = (props) => { | ||
return ( | ||
<Routes> | ||
<Route element={<HeaderLayout {...props} />}> | ||
<Route path={LOGS_ROUTE} element={<LogsHeader />} /> | ||
<Route path={QUERY_ROUTE} element={<QueryHeader />} /> | ||
<Route path={STATS_ROUTE} element={<StatsHeader />} /> | ||
<Route path={CONFIG_ROUTE} element={<ConfigHeader />} /> | ||
<Route path={USERS_MANAGEMENT_ROUTE} element={<UsersManagementHeader />} /> | ||
</Route> | ||
</Routes> | ||
); | ||
}; | ||
|
||
export default SecondaryHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,7 @@ | ||
import type { HeaderProps as MantineHeaderProps } from '@mantine/core'; | ||
import { FC } from 'react'; | ||
import { Route, Routes } from 'react-router-dom'; | ||
import HeaderLayout from './Layout'; | ||
import { ConfigHeader, LogsHeader, QueryHeader, StatsHeader, UsersManagementHeader } from './SubHeader'; | ||
import { CONFIG_ROUTE, LOGS_ROUTE, QUERY_ROUTE, STATS_ROUTE, USERS_MANAGEMENT_ROUTE } from '@/constants/routes'; | ||
import PrimaryHeader from "./PrimaryHeader"; | ||
import SecondaryHeader from "./SecondaryHeader"; | ||
|
||
type HeaderProps = Omit<MantineHeaderProps, 'children' | 'height' | 'className'>; | ||
|
||
const Header: FC<HeaderProps> = (props) => { | ||
return ( | ||
<Routes> | ||
<Route element={<HeaderLayout {...props} />}> | ||
<Route path={LOGS_ROUTE} element={<LogsHeader />} /> | ||
<Route path={QUERY_ROUTE} element={<QueryHeader />} /> | ||
<Route path={STATS_ROUTE} element={<StatsHeader />} /> | ||
<Route path={CONFIG_ROUTE} element={<ConfigHeader />} /> | ||
<Route path={USERS_MANAGEMENT_ROUTE} element={<UsersManagementHeader />} /> | ||
</Route> | ||
</Routes> | ||
); | ||
}; | ||
|
||
export default Header; | ||
export { | ||
PrimaryHeader, | ||
SecondaryHeader | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const HEADER_HEIGHT = 70; | ||
export const HEADER_HEIGHT = 50; | ||
export const NAVBAR_WIDTH = 200; | ||
export const APP_MIN_WIDTH = 650; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters