forked from enricoros/big-AGI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'enricoros:v2-dev' into v2-dev
- Loading branch information
Showing
24 changed files
with
566 additions
and
288 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import * as React from 'react'; | ||
|
||
import { Breadcrumbs, Typography } from '@mui/joy'; | ||
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; | ||
|
||
import { Link } from '~/common/components/Link'; | ||
|
||
|
||
const _sx = { p: 0 }; | ||
|
||
export function AppBreadcrumbs(props: { | ||
children?: React.ReactNode; | ||
rootTitle?: string; | ||
onRootClick?: () => void; | ||
}) { | ||
|
||
// prevent default href | ||
|
||
const { rootTitle, onRootClick } = props; | ||
const handleRootClick = React.useCallback((e: React.MouseEvent) => { | ||
e.preventDefault(); | ||
onRootClick?.(); | ||
}, [onRootClick]); | ||
|
||
return <Breadcrumbs size='sm' separator={<KeyboardArrowRightIcon />} aria-label='breadcrumbs' sx={_sx}> | ||
{(props.children && !!rootTitle && !!onRootClick) | ||
? <AppBreadcrumbs.Link color='neutral' href='#' onClick={handleRootClick}>{props.rootTitle}</AppBreadcrumbs.Link> | ||
: <Typography>{props.rootTitle}</Typography> | ||
} | ||
{props.children} | ||
{/*{nav.pnt === 'create-new' && <Link color='neutral' href='#'>Create New</Link>}*/} | ||
{/*{['Characters', 'Futurama', 'TV Shows', 'Home'].map((item: string) => (*/} | ||
{/* <Link key={item} color='neutral' href='#'>*/} | ||
{/* {item}*/} | ||
{/* </Link>*/} | ||
{/*))}*/} | ||
</Breadcrumbs>; | ||
} | ||
|
||
// Important, use this as Link | ||
AppBreadcrumbs.Link = Link; | ||
|
||
// Important, use this as Leaf | ||
AppBreadcrumbs.Leaf = Typography; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import * as React from 'react'; | ||
|
||
import { Box, ListDivider, Typography } from '@mui/joy'; | ||
|
||
|
||
export function OptimaAppPageHeading(props: { | ||
title: React.ReactNode; | ||
tagline?: React.ReactNode; | ||
accentedTagline?: boolean; | ||
startDecorator?: React.ReactNode; | ||
endDecorator?: React.ReactNode; | ||
noDivider?: boolean; | ||
}) { | ||
return ( | ||
<Box mb={2.25}> | ||
{!!props.title && <Typography level='h2' sx={{ textAlign: 'start' }} startDecorator={props.startDecorator} endDecorator={props.endDecorator}> | ||
{props.title} | ||
</Typography>} | ||
{!!props.tagline && <Typography level='body-sm' sx={{ color: !props.accentedTagline ? undefined : 'text.secondary', textAlign: 'start', mt: 0.75 }}> | ||
{props.tagline} | ||
</Typography>} | ||
{!props.noDivider && <ListDivider sx={{ mt: 2.25 }} />} | ||
</Box> | ||
); | ||
} |
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
Oops, something went wrong.